You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "dajac (via GitHub)" <gi...@apache.org> on 2026/08/17 08:09:58 UTC

Re: [PR] KAFKA-20938: Complete stale JoinGroup/SyncGroup future on superseded classic-group request [kafka]

dajac commented on code in PR #23174:
URL: https://github.com/apache/kafka/pull/23174#discussion_r3794739435


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
@@ -7706,6 +7706,15 @@ private CoordinatorResult<Void, CoordinatorRecord> updateMemberThenRebalanceOrCo
         String joinReason,
         CompletableFuture<JoinGroupResponseData> responseFuture
     ) {
+        // A prior JoinGroup for this member may still be pending; complete it before
+        // group.updateMember discards it, or it would never resolve on its own.
+        if (member.isAwaitingJoin()) {
+            group.completeJoinFuture(member, new JoinGroupResponseData()
+                .setMemberId(member.memberId())
+                .setErrorCode(Errors.REBALANCE_IN_PROGRESS.code())

Review Comment:
   Wondering whether `REBALANCE_IN_PROGRESS` is the right error to use. Could you elaborate on the choice? `NOT_COORDINATOR` could also be an option to consider.



-- 
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-unsubscribe@kafka.apache.org

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