junrao commented on code in PR #17528:
URL: https://github.com/apache/kafka/pull/17528#discussion_r1824884805
##########
clients/src/main/java/org/apache/kafka/common/record/FileRecords.java:
##########
@@ -317,7 +317,7 @@ public LogOffsetPosition searchForOffsetWithSize(long
targetOffset, int starting
for (FileChannelRecordBatch batch : batchesFrom(startingPosition)) {
long offset = batch.lastOffset();
if (offset >= targetOffset)
- return new LogOffsetPosition(offset, batch.position(),
batch.sizeInBytes());
+ return new LogOffsetPosition(batch.baseOffset(),
batch.position(), batch.sizeInBytes());
Review Comment:
Could we adjust the comment on the return value to make it clear that the
offset/position returned is at the batch level? It would be useful to adjust
the comment on the return value in the caller too.
--
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]