m1a2st commented on PR #19214:
URL: https://github.com/apache/kafka/pull/19214#issuecomment-2730090896

   > Also, how about the case where a target offset lies between batches (which 
I think is possible due to compaction
   
   In the previous logic, it would point to the next batch. For example, if 
batch1 has a `baseOffset` of 1 and a `lastOffset` of 5, and batch2 has a 
`baseOffset` of 10 and a `lastOffset` of 15, with a targetOffset of 7, the 
check `lastOffset >= targetOffset` would cause it to return batch2.  
   
   I have also added a test for this scenario.


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