singhpk234 commented on a change in pull request #4461:
URL: https://github.com/apache/iceberg/pull/4461#discussion_r841006878
##########
File path: aliyun/src/main/java/org/apache/iceberg/aliyun/oss/OSSFileIO.java
##########
@@ -89,7 +89,11 @@ public void deleteFile(String path) {
private OSS client() {
if (client == null) {
- client = oss.get();
+ synchronized (this) {
+ if (client == null) {
+ client = oss.get();
+ }
+ }
Review comment:
As per my understanding the since s3 client is not serializable and
initialize being called in only at driver when FileIO is initialized via
CatlogUtil, we capture the s3 client against the wrapper `SerializableSupplier`
and this will now be part of serialized FileIO obj (which will be used when
it's broadcasted). Now in the executor the task threads starts calling the
FileIO func directly, without calling intialize etc.
IIUC, it might not be possible to do it in initialize which is called at
driver, Am I missing something here ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]