rajinisivaram commented on a change in pull request #8986: URL: https://github.com/apache/kafka/pull/8986#discussion_r518938665
########## File path: clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractCoordinator.java ########## @@ -460,15 +462,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 GroupAuthorizationException) Review comment: @abbccdda Thanks for the review, sorry about the delay in following this up. The main purpose of this PR is to add backoff before propagating GroupAuthorizationException so that a client that polls in a loop doesn't end up in a tight poll loop if user doesn't have access to the group. Added comments. ---------------------------------------------------------------- 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