suzhiking commented on code in PR #23530:
URL: https://github.com/apache/kafka/pull/23530#discussion_r4531191114
##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/GroupMetadataManagerTest.java:
##########
@@ -25759,19 +26004,15 @@ public void
testReplayStreamsGroupTargetAssignmentMetadataTombstoneExisting() {
)
.build();
- IllegalStateException e = assertThrows(
- IllegalStateException.class,
- () ->
context.replay(StreamsCoordinatorRecordHelpers.newStreamsGroupTargetAssignmentMetadataTombstoneRecord("foo"))
- );
- assertEquals("Received a tombstone record to delete target assignment
of foo but the assignment still has 1 members.",
- e.getMessage());
-
-
context.replay(StreamsCoordinatorRecordHelpers.newStreamsGroupTargetAssignmentTombstoneRecord("foo",
"m1"));
-
+ // The target assignment still has a member, i.e. the
StreamsGroupTargetAssignmentMember
+ // tombstone has not been seen. This can happen when the coordinator
loads while compaction
+ // removed it. The metadata tombstone is authoritative: it replays the
missing member
+ // target assignment tombstone and resets the assignment epoch.
Review Comment:
thanks, missed it when addressing Sean's comments
--
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]