anuragmantri commented on code in PR #14161:
URL: https://github.com/apache/iceberg/pull/14161#discussion_r2373648254
##########
aws/src/main/java/org/apache/iceberg/aws/ApacheHttpClientConfigurations.java:
##########
@@ -44,7 +44,11 @@ private ApacheHttpClientConfigurations() {}
public <T extends AwsSyncClientBuilder> void configureHttpClientBuilder(T
awsClientBuilder) {
ApacheHttpClient.Builder apacheHttpClientBuilder =
ApacheHttpClient.builder();
configureApacheHttpClientBuilder(apacheHttpClientBuilder);
- awsClientBuilder.httpClientBuilder(apacheHttpClientBuilder);
+ // Use httpClient(<client>) method in AWS SDKv2 to prevent shared
connection pools from closing
+ // prematurely.
+ // See:
+ //
https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/core/client/builder/SdkAsyncClientBuilder.html#httpClient(software.amazon.awssdk.http.async.SdkAsyncHttpClient)
+ awsClientBuilder.httpClient(apacheHttpClientBuilder.build());
Review Comment:
Yes, we are still figuring out how to keep track of the connection pool and
close them. I think we will wrap the client with `java.lang.ref.Cleaner`. I
will mark this PR as WIP till then.
--
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]