adixitconfluent commented on code in PR #20823:
URL: https://github.com/apache/kafka/pull/20823#discussion_r2491533918


##########
core/src/main/java/kafka/server/share/SharePartition.java:
##########
@@ -2375,7 +2375,9 @@ be removed once all the records (0-99) are acknowledged 
(ACCEPT or REJECT).
             NavigableMap.Entry<Long, InFlightBatch> entry = 
cachedState.floorEntry(lastOffsetAcknowledged);
             // If the lastOffsetAcknowledged is equal to the last offset of 
entry, then the entire batch can potentially be removed.
             if (lastOffsetAcknowledged == entry.getValue().lastOffset()) {
-                startOffset = cachedState.higherKey(lastOffsetAcknowledged);
+                if (cachedState.higherKey(lastOffsetAcknowledged) > 
startOffset) {

Review Comment:
   utilized a variable for it



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