suvodeep-pyne commented on code in PR #20442:
URL: https://github.com/apache/pinot/pull/20442#discussion_r4765009496


##########
pinot-plugins/pinot-file-system/pinot-s3/src/main/java/org/apache/pinot/plugin/filesystem/S3PinotFS.java:
##########
@@ -264,13 +265,18 @@ public AwsCredentials getAwsCredentials() {
 
   /// Executes the given S3 operation, retrying once after refreshing AWS 
credentials if an [S3Exception] occurs.
   ///
+  /// `AccessDenied` is not retried: a refresh cannot grant a missing 
permission, and it closes the S3 client under
+  /// calls that are still using it.
+  ///
   /// @param action the S3 operation to execute
   /// @param <T> the type of the result returned by the operation
   /// @return the result of the S3 operation
-  /// @throws IOException if the operation fails after credential refresh
+  /// @throws IOException if S3 denies access or the retry fails
   private <T> T retryWithS3CredentialRefresh(Supplier<T> action) throws 
IOException {
     try {
       return action.get();
+    } catch (AccessDeniedException e) {
+      throw new IOException("S3 denied access to the request", e);

Review Comment:
   This is an access denied exception. I don't expect a lot of detail to be 
emitted here but escalated with the exception so it is accessible upsteam



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