junrao commented on a change in pull request #11856:
URL: https://github.com/apache/kafka/pull/11856#discussion_r827520576
##########
File path: core/src/main/scala/kafka/log/LogSegment.scala
##########
@@ -161,13 +161,13 @@ class LogSegment private[log] (val log: FileRecords,
if (largestTimestamp > maxTimestampSoFar) {
maxTimestampAndOffsetSoFar = TimestampOffset(largestTimestamp,
shallowOffsetOfMaxTimestamp)
}
+ bytesSinceLastIndexEntry += records.sizeInBytes
Review comment:
Well, it seems that the physicalPosition we add to the index corresponds
to the position before the records are appended. So, updating
bytesSinceLastIndexEntry after the index append seems correct.
--
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]