You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by sc...@apache.org on 2025/04/24 15:18:37 UTC
(kafka) branch trunk updated: MINOR: Improve member epoch mismatch logging for share groups (#19549)
This is an automated email from the ASF dual-hosted git repository.
schofielaj pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new 039ba5e29de MINOR: Improve member epoch mismatch logging for share groups (#19549)
039ba5e29de is described below
commit 039ba5e29de2209298d96822f478e3869e256f4e
Author: Andrew Schofield <as...@confluent.io>
AuthorDate: Thu Apr 24 16:18:30 2025 +0100
MINOR: Improve member epoch mismatch logging for share groups (#19549)
The heartbeat logic for share groups is tricky when the set of
topic-partitions eligible for assignment changes. We have observed epoch
mismatches when brokers are restarted, which should not be possible.
Improving the logging so we can see the previous member epoch and tally
this with the logged state.
Reviewers: Apoorv Mittal <ap...@gmail.com>, Sushant Mahajan <sm...@confluent.io>
---
.../org/apache/kafka/coordinator/group/GroupMetadataManager.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java b/group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java
index 2c03b2a3029..6abe959dcf0 100644
--- a/group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java
+++ b/group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java
@@ -1754,12 +1754,12 @@ public class GroupMetadataManager {
+ "epoch (" + receivedMemberEpoch + ") than the one known by the group coordinator ("
+ member.memberEpoch() + "). The member must abandon all its partitions and rejoin.");
} else if (receivedMemberEpoch < member.memberEpoch()) {
- // If the member comes with the previous epoch and has a subset of the current assignment partitions,
- // we accept it because the response with the bumped epoch may have been lost.
+ // If the member comes with the previous epoch, we accept it because the response with the bumped epoch may have been lost.
if (receivedMemberEpoch != member.previousMemberEpoch()) {
throw new FencedMemberEpochException("The share group member has a smaller member "
- + "epoch (" + receivedMemberEpoch + ") than the one known by the group coordinator ("
- + member.memberEpoch() + "). The member must abandon all its partitions and rejoin.");
+ + "epoch (" + receivedMemberEpoch + ") than the one known by the group coordinator ("
+ + member.memberEpoch() + "), and it does not match the previous member epoch ("
+ + member.previousMemberEpoch() + "). The member must abandon all its partitions and rejoin.");
}
}
}