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


##########
storage/src/main/java/org/apache/kafka/storage/internals/log/LogValidator.java:
##########
@@ -275,7 +278,7 @@ public ValidationResult assignOffsetsNonCompressed(LongRef 
offsetCounter,
 
             if (batch.magic() > RecordBatch.MAGIC_VALUE_V0 && 
maxBatchTimestamp > maxTimestamp) {
                 maxTimestamp = maxBatchTimestamp;
-                offsetOfMaxTimestamp = offsetOfMaxBatchTimestamp;
+                shallowOffsetOfMaxTimestamp = offsetOfMaxBatchTimestamp;

Review Comment:
   > Do we have test cases covering that?
   
   There is a UT already, and I will add more tests to cover it.
   
   
https://github.com/apache/kafka/blob/cc6b919212ae62d75850214ae2c93379b78ff325/core/src/test/scala/unit/kafka/log/LogValidatorTest.scala#L408



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