johnnychhsu commented on code in PR #15476:
URL: https://github.com/apache/kafka/pull/15476#discussion_r1527026867


##########
core/src/test/scala/unit/kafka/log/LogValidatorTest.scala:
##########
@@ -173,9 +173,9 @@ class LogValidatorTest {
     assertEquals(now, validatedResults.maxTimestampMs, s"Max timestamp should 
be $now")
     assertFalse(validatedResults.messageSizeMaybeChanged, "Message size should 
not have been changed")
 
-    // we index from last offset in version 2 instead of base offset
-    val expectedMaxTimestampOffset = if (magic >= RecordBatch.MAGIC_VALUE_V2) 
2 else 0
-    assertEquals(expectedMaxTimestampOffset, 
validatedResults.shallowOffsetOfMaxTimestampMs,
+    // If it's LOG_APPEND_TIME, the offset will be the first offset of the 
record

Review Comment:
   thanks for the comment! 
   you are right, let me update this sentence 



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

Reply via email to