cmccabe commented on code in PR #13108: URL: https://github.com/apache/kafka/pull/13108#discussion_r1068983515
########## metadata/src/main/java/org/apache/kafka/image/MetadataProvenance.java: ########## @@ -28,30 +29,30 @@ public final class MetadataProvenance { public static final MetadataProvenance EMPTY = new MetadataProvenance(-1L, -1, -1L); - private final long offset; - private final int epoch; + private final long lastContainedOffset; + private final int lastContainedEpoch; private final long lastContainedLogTimeMs; public MetadataProvenance( - long offset, - int epoch, + long lastContainedOffset, + int lastContainedEpoch, long lastContainedLogTimeMs ) { - this.offset = offset; - this.epoch = epoch; + this.lastContainedOffset = lastContainedOffset; + this.lastContainedEpoch = lastContainedEpoch; this.lastContainedLogTimeMs = lastContainedLogTimeMs; } - public OffsetAndEpoch offsetAndEpoch() { - return new OffsetAndEpoch(offset, epoch); + public OffsetAndEpoch snapshotId() { + return new OffsetAndEpoch(lastContainedOffset + 1, lastContainedEpoch); Review Comment: Can you add a comment about how the snapshot ID contains an offset one greater than the last contained offset? It could otherwise be easy to miss. Probably include a reference to this JIRA as well. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org