apoorvmittal10 commented on code in PR #20738:
URL: https://github.com/apache/kafka/pull/20738#discussion_r2447649471
##########
core/src/main/java/kafka/server/share/SharePartition.java:
##########
@@ -776,6 +778,15 @@ public ShareAcquiredRecords acquire(
// If nextBatchStartOffset is less than the key of the
entry, this means the fetch happened for a gap in the cachedState.
// Thus, a new batch needs to be acquired for the gap.
if (maybeGapStartOffset < entry.getKey()) {
+ // It's safe to use entry.getKey() - 1 as the last
offset to acquire for the
+ // gap as th sub map should contain either the next
batch or this line should
Review Comment:
Done.
--
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]