kamalcph commented on code in PR #17676:
URL: https://github.com/apache/kafka/pull/17676#discussion_r1827042299


##########
core/src/main/java/kafka/log/remote/RemoteLogManager.java:
##########
@@ -1685,6 +1685,7 @@ public FetchDataInfo read(RemoteStorageFetchInfo 
remoteStorageFetchInfo) throws
                 return new FetchDataInfo(new LogOffsetMetadata(offset), 
MemoryRecords.EMPTY);
             }
 
+            startPos = lookupPositionForOffset(remoteLogSegmentMetadata, 
firstBatch.baseOffset());

Review Comment:
   offset-index is a sparse one, so the position returned here might be same as 
the previous one. To fix this issue, we may have to calculate the discarded 
batch-size and include them in the FetchSize for calculating the 
upperBoundOffset.



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