JeetKunDoug commented on code in PR #132:
URL: https://github.com/apache/cassandra-sidecar/pull/132#discussion_r1729423181


##########
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:
   Do we need to check if OpenSSL is available before setting the provider, or 
is Netty OK with this state?



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