varunv-cflt commented on code in PR #23174:
URL: https://github.com/apache/kafka/pull/23174#discussion_r3878870541


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/classic/ClassicGroupMember.java:
##########
@@ -397,16 +398,35 @@ public void setAssignment(byte[] value) {
     }
 
     /**
+     * Set the member's join future. If a join future is already pending when 
a new,
+     * non-null one is set, the new request supersedes it, so the earlier one 
is
+     * completed with REBALANCE_IN_PROGRESS first -- otherwise it would never 
resolve
+     * on its own.
+     *
      * @param value the updated join future.
      */
     public void setAwaitingJoinFuture(CompletableFuture<JoinGroupResponseData> 
value) {
+        if (value != null && awaitingJoinFuture != null) {

Review Comment:
   Restructured the code to invoke `group.completeJoinFuture` before 
`updateMember` which will take care of both the concerns.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to