RivenSun2 commented on a change in pull request #11340:
URL: https://github.com/apache/kafka/pull/11340#discussion_r742568236



##########
File path: 
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerCoordinator.java
##########
@@ -692,10 +693,18 @@ private void validateCooperativeAssignment(final 
Map<String, List<TopicPartition
     }
 
     @Override
-    protected void onJoinPrepare(int generation, String memberId) {
+    protected boolean onJoinPrepare(int generation, String memberId) {
         log.debug("Executing onJoinPrepare with generation {} and memberId 
{}", generation, memberId);
-        // commit offsets prior to rebalance if auto-commit enabled
-        
maybeAutoCommitOffsetsSync(time.timer(rebalanceConfig.rebalanceTimeoutMs));
+        boolean onJoinPrepareAsyncCommitSucceeded;
+        try {
+            // async commit offsets prior to rebalance if auto-commit enabled
+            onJoinPrepareAsyncCommitSucceeded = maybeAutoCommitOffsetsAsync();
+        } catch (Exception e) {
+            onJoinPrepareAsyncCommitFuture = null;
+            onJoinPrepareAsyncCommitSucceeded = true;

Review comment:
       If the exception is of non-retryable type, decide to abandon to 
asyncCommit offsets




-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to