kevinjqliu commented on PR #12299:
URL: https://github.com/apache/iceberg/pull/12299#issuecomment-2715574083

   I verified that the async client should only affect S3 FileIO when the 
feature flag is enabled. 
   
   `s3Async()` is the factory function that returns a `S3AsyncClient`.
   It is called in `S3FileIO`'s `initialize` function and sets the `s3Async` 
variable.
   ```
       // Do not override s3Async client if it was provided
       if (s3Async == null) {
         Object clientFactory = S3FileIOAwsClientFactories.initialize(props);
         if (clientFactory instanceof S3FileIOAwsClientFactory) {
           this.s3Async = ((S3FileIOAwsClientFactory) clientFactory)::s3Async;
         }
         if (clientFactory instanceof AwsClientFactory) {
           this.s3Async = ((AwsClientFactory) clientFactory)::s3Async;
         }
       }
   ```
   `s3Async` is called in `S3FileIO`'s `asyncClient()` function to return an 
async client.
   ```
     public S3AsyncClient asyncClient() {
       if (asyncClient == null) {
         synchronized (this) {
           if (asyncClient == null) {
             asyncClient = s3Async.get();
           }
         }
       }
       return asyncClient;
     }
   ```
   
   `asyncClient()` is only called within the accelerator library or when gated 
by `shouldUseAsyncClient()`
   
   
   
   


-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to