rajinisivaram commented on a change in pull request #8986:
URL: https://github.com/apache/kafka/pull/8986#discussion_r450129557



##########
File path: 
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractCoordinator.java
##########
@@ -460,15 +463,21 @@ boolean joinGroupIfNeeded(final Timer timer) {
                     exception instanceof IllegalGenerationException ||
                     exception instanceof MemberIdRequiredException)
                     continue;
-                else if (!future.isRetriable())
-                    throw exception;
-
-                timer.sleep(rebalanceConfig.retryBackoffMs);
+                else {
+                    handleFailure(future, timer);
+                }
             }
         }
         return true;
     }
 
+    protected void handleFailure(RequestFuture<?> future, Timer timer) {
+        if (future.isRetriable() || future.exception() instanceof 
AuthorizationException)

Review comment:
       @hachikuji AuthorizationException is not marked as a retriable 
exception, but I think applications would typically retry since it could be 
transient while ACLs have not yet been propagated. Not sure whether we should 
do one or both of these:
   1) Make AuthorizationException retriable since it could be transient, seemed 
riskier than just checking here.
   2) Add backoff for all exceptions, not just AuthorizationException and other 
retriable exceptions to avoid tight loops. Wasn't sure what other fatal 
exceptions may be thrown when looking up coordinator.
   




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to