jsancio commented on a change in pull request #10786: URL: https://github.com/apache/kafka/pull/10786#discussion_r649320552
########## File path: metadata/src/main/java/org/apache/kafka/controller/SnapshotGenerator.java ########## @@ -74,56 +74,49 @@ String name() { this.batch = null; this.section = null; this.numRecords = 0; - this.numWriteTries = 0; } /** * Returns the epoch of the snapshot that we are generating. */ long epoch() { - return writer.epoch(); + return writer.lastOffset(); Review comment: Yes but the names are not great. Updated the names of `SnapshotGenerator.epoch` and `SnapshotWriter.lastOffset` to `lastOffsetFromLog`. This should make it clear that the offset of the batches in the snapshots are independent of the last offset from the log that is included in the snapshot. -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org