yifan-c commented on code in PR #132:
URL: https://github.com/apache/cassandra-sidecar/pull/132#discussion_r1729427624


##########
src/main/java/org/apache/cassandra/sidecar/restore/StorageClientPool.java:
##########
@@ -103,16 +105,22 @@ private StorageClient storageClient(String region)
             Map<SdkAdvancedAsyncClientOption<?>, ?> advancedOptions = 
Collections.singletonMap(
             SdkAdvancedAsyncClientOption.FUTURE_COMPLETION_EXECUTOR, 
sharedExecutor
             );
+            Duration apiCallTimeout = 
Duration.ofSeconds(clientConfig.apiCallTimeoutMillis());
             S3AsyncClientBuilder clientBuilder =
             S3AsyncClient.builder()
                          .region(Region.of(region))
+                         // Setting the same timeout for apiCall and 
apiCallAttempt; There is 1 attempt effectively, as we do retry in the 
application
+                         .overrideConfiguration(b -> 
b.apiCallAttemptTimeout(apiCallTimeout)
+                                                      
.apiCallTimeout(apiCallTimeout))
                          .asyncConfiguration(b -> 
b.advancedOptions(advancedOptions));
             S3ProxyConfiguration s3ProxyConfiguration = 
clientConfig.proxyConfig();
             URI endpointOverride = s3ProxyConfiguration.endpointOverride();
             if (endpointOverride != null) // set for local testing only
                 clientBuilder.endpointOverride(endpointOverride)
                              .forcePathStyle(true);
 
+            NettyNioAsyncHttpClient.Builder nettyClientBuilder = 
NettyNioAsyncHttpClient.builder()
+                                                                               
         .sslProvider(SslProvider.OPENSSL);

Review Comment:
   Looks like netty does the auto-selection. There is no need to set the 
`sslProvider` explicitly. I will remove the option and add a warning message 
when openSSL is not available. 



-- 
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]

Reply via email to