philipnee commented on code in PR #15035:
URL: https://github.com/apache/kafka/pull/15035#discussion_r1431513080
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/MembershipManagerImpl.java:
##########
@@ -672,7 +672,11 @@ public void onHeartbeatRequestSent() {
MemberState state = state();
if (isStaled()) {
log.debug("Member {} is staled and is therefore leaving the group.
It will rejoin upon the next poll.", memberEpoch);
- transitionToJoining();
+ // clear the current assignment and subscription, and trigger
rebalance listener on the next poll
+
invokeOnPartitionsRevokedCallback(subscriptions.assignedPartitions()).whenComplete((r,
e) -> {
Review Comment:
when the member becomes staled, it is still part of the group because it
hasn't left yet. however, the background thread will need to leave the group
and revoke all of its assignment because we assume the consumer is not being
used - this is the logic for max.poll.interval.ms. since we are leaving the
group, we will need to revoke all assignments.
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/MembershipManagerImpl.java:
##########
@@ -728,7 +732,6 @@ public boolean shouldSkipHeartbeat() {
@Override
public void transitionToStaled() {
memberEpoch = ConsumerGroupHeartbeatRequest.LEAVE_GROUP_MEMBER_EPOCH;
- currentAssignment.clear();
Review Comment:
correct
--
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]