chia7712 commented on code in PR #15621:
URL: https://github.com/apache/kafka/pull/15621#discussion_r1548258165


##########
storage/src/main/java/org/apache/kafka/storage/internals/log/LogValidator.java:
##########
@@ -434,7 +442,8 @@ public ValidationResult 
validateMessagesAndAssignOffsetsCompressed(LongRef offse
                 now,
                 records,
                 maxTimestamp,
-                offsetOfMaxTimestamp,
+                // there is only one batch in this path, so last offset can be 
viewed as shallowOffsetOfMaxTimestamp
+                lastOffset,

Review Comment:
   If the magic is 0, we don't reach this path. Instead, we run 
`buildRecordsAndAssignOffsets` to handle the version 0. see 
https://github.com/apache/kafka/blob/ee61bb721eecb0404929f125fe43392f3d024453/storage/src/main/java/org/apache/kafka/storage/internals/log/LogValidator.java#L343



-- 
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

Reply via email to