abhishekrb19 commented on code in PR #16438:
URL: https://github.com/apache/druid/pull/16438#discussion_r1598614756


##########
extensions-core/s3-extensions/src/main/java/org/apache/druid/storage/s3/ServerSideEncryptingAmazonS3.java:
##########
@@ -204,7 +205,19 @@ public ServerSideEncryptingAmazonS3 build()
         throw new ISE("S3StorageConfig cannot be null!");
       }
 
-      return new ServerSideEncryptingAmazonS3(amazonS3ClientBuilder.build(), 
s3StorageConfig.getServerSideEncryption());
+      AmazonS3 amazonS3Client;
+      try {
+        amazonS3Client = RetryUtils.retry(
+            () -> amazonS3ClientBuilder.build(),
+            (e) -> true,
+            RetryUtils.DEFAULT_MAX_TRIES
+        );
+      }
+      catch (Exception e) {
+        throw new RuntimeException(e);
+      }
+
+      return new ServerSideEncryptingAmazonS3(amazonS3Client, 
s3StorageConfig.getServerSideEncryption());

Review Comment:
   Yeah, I don't think we want to retry unconditionally on all exceptions. If 
an error is non-recoverable, we should fail fast instead of retrying. 
   
   Also, could you elaborate on why we need this exception to be retriable - 
"Unable to find a region via the region provider chain"?
   



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