kevin-wu24 commented on code in PR #17528:
URL: https://github.com/apache/kafka/pull/17528#discussion_r1809610586
##########
core/src/test/scala/unit/kafka/cluster/PartitionTest.scala:
##########
@@ -1149,8 +1149,8 @@ class PartitionTest extends AbstractPartitionTest {
// let the follower in ISR move leader's HW to move further but below LEO
fetchFollower(partition, replicaId = follower2, fetchOffset = 0)
- fetchFollower(partition, replicaId = follower2, fetchOffset =
lastOffsetOfFirstBatch)
- assertEquals(lastOffsetOfFirstBatch, partition.log.get.highWatermark,
"Expected leader's HW")
+ fetchFollower(partition, replicaId = follower2, fetchOffset =
lastOffsetOfFirstBatch + 1)
Review Comment:
Similar thing happening here as the UnifiedLogTest `testOffsetSnapshot`.
`lastOffsetOfFirstBatch == 1` which is not the first record in a batch, so the
`LogOffsetMetadata.offset` associated with the highWatermark was 0.
--
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]