lianetm commented on code in PR #16017: URL: https://github.com/apache/kafka/pull/16017#discussion_r1612046806
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/MembershipManagerImpl.java: ########## @@ -422,7 +422,7 @@ public void onHeartbeatSuccess(ConsumerGroupHeartbeatResponseData response) { if (state == MemberState.LEAVING) { log.debug("Ignoring heartbeat response received from broker. Member {} with epoch {} is " + "already leaving the group.", memberId, memberEpoch); - return; +// return; Review Comment: Is there a need to process the leave group response now? We were intentionally avoiding processing the leave response just to avoid undesired effects on the client due to unexpected responses. Processing the HB response leads to updating memberId, epoch, reconciling assignments, state transitions, etc, depending on the content of the response. On the leave, we don't expect any, and we actually do the transitions that are needed the moment the leave request is sent out, so just short-circuiting here. -- 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