arp7 commented on a change in pull request #693: HDDS-3220. Filesystem client 
should not retry on AccessControlException.
URL: https://github.com/apache/hadoop-ozone/pull/693#discussion_r394438647
 
 

 ##########
 File path: 
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocolPB/OzoneManagerProtocolClientSideTranslatorPB.java
 ##########
 @@ -292,13 +295,30 @@ private RetryAction getRetryAction(RetryAction 
fallbackAction,
     return proxy;
   }
 
+  /**
+   * Unwrap exception to check if it is a {@link AccessControlException}.
+   */
+  private boolean isAccessControlException(Exception ex) {
+    if (ex instanceof ServiceException) {
+      Throwable t = ex.getCause();
+      if (t instanceof IOException) {
+        t = t.getCause();
+        if (t instanceof IOException) {
 
 Review comment:
   Wow is it wrapped that deeply? Can we make this check a bit more robust, if 
any of the nested exceptions is an instanceOf `AccessControlException` and also 
check in a loop while `getCause` returns non-null?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to