NicoleYWDu opened a new pull request, #24301: URL: https://github.com/apache/kafka/pull/24301
The runtime creates a snapshot at offset 0 when the shard is created and at the new last written offset after each write (`SnapshottableCoordinator.updateLastWrittenOffset`). `OffsetMetadataManagerTestContext` created a snapshot before each record instead, so after `commit()` there was no snapshot at `lastCommittedOffset` until the next write. This aligns the context with the runtime and with `GroupMetadataManagerTestContext`: the snapshot is created at `lastWrittenOffset` in the constructor and after each replayed record. Found while reviewing #24071, which needs a snapshot at the committed offset to test the ListGroups committed-offsets filter at `lastCommittedOffset`. -- 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]
