hachikuji commented on a change in pull request #10914: URL: https://github.com/apache/kafka/pull/10914#discussion_r665735408
########## File path: clients/src/main/java/org/apache/kafka/common/record/DefaultRecordBatch.java ########## @@ -156,13 +161,27 @@ public void ensureValid() { } /** - * Get the timestamp of the first record in this batch. It is always the create time of the record even if the + * Gets the base timestamp of the batch which is used to calculate the timestamp deltas. + * + * @return The base timestamp or + * {@link RecordBatch#NO_TIMESTAMP} if the batch is empty + */ + public long baseTimestamp() { Review comment: I think we need to update `DefaultRecordBatch.RecordIterator` to use `baseTimestamp()` instead of `firstTimestamp()`. We should also make sure we have a test case to ensure that the record timestamps remain correct even when the delete horizon has been set. -- 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