NicoleYWDu commented on code in PR #24071:
URL: https://github.com/apache/kafka/pull/24071#discussion_r4617719519
##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/OffsetMetadataManagerTest.java:
##########
@@ -338,6 +338,13 @@ public boolean cleanupExpiredOffsets(String groupId,
List<CoordinatorRecord> rec
return isOffsetsEmptyForGroup;
}
+ public boolean hasCommittedOffsets(String groupId) {
+ // The runtime keeps a snapshot at the last written offset;
replay() in this
+ // context only snapshots the state before each record, so create
it here.
+ snapshotRegistry.idempotentCreateSnapshot(lastWrittenOffset);
Review Comment:
Thanks for catching this! I've opened
[#24301](https://github.com/apache/kafka/pull/24301) to fix the snapshot
behavior in `OffsetMetadataManagerTestContext`. Once it's merged, I'll update
this PR.
--
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]