jsancio commented on a change in pull request #10946:
URL: https://github.com/apache/kafka/pull/10946#discussion_r661798375
##########
File path: raft/src/main/java/org/apache/kafka/snapshot/SnapshotReader.java
##########
@@ -77,6 +79,18 @@ public int lastContainedLogEpoch() {
return snapshotId.epoch;
}
+ /**
+ * Returns the timestamp of the last log offset which is represented in
the snapshot.
+ */
+ public long lastContainedLogTimestamp() {
+ if (!lastContainedLogTimestamp.isPresent()) {
+ // nextBatch is expected to be empty
+ nextBatch = nextBatch();
Review comment:
I documented this in the PR description and comment in this file:
https://github.com/apache/kafka/pull/10946/files/1964e026b783235e2d9af9c0b116f15ed31e0a5b#diff-83295dbf4af9755c79987b390f72f53dda47af9f82eb8305755d90da18d5b9f2R142-R143
In this PR, I am proposing that we just use the append time of the first
batch. In this PR https://issues.apache.org/jira/browse/KAFKA-13020, we will
read the first batch which will be a control batch, deserialize the value and
report that timestamp.
--
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]