chirag-wadhwa5 commented on code in PR #18696: URL: https://github.com/apache/kafka/pull/18696#discussion_r1929050439
########## core/src/main/java/kafka/server/share/SharePartition.java: ########## @@ -1212,7 +1282,11 @@ private ShareAcquiredRecords acquireNewBatchRecords( if (cachedState.firstKey() == firstAcquiredOffset) { startOffset = firstAcquiredOffset; } - endOffset = lastAcquiredOffset; + + if (lastAcquiredOffset > endOffset) { + endOffset = lastAcquiredOffset; + } Review Comment: Thanks for the review. I have added the comment explaining 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