chirag-wadhwa5 commented on code in PR #18696:
URL: https://github.com/apache/kafka/pull/18696#discussion_r1932032598


##########
core/src/main/java/kafka/server/share/SharePartition.java:
##########
@@ -1758,6 +1837,11 @@ private void maybeUpdateCachedStateAndOffsets() {
                 return;
             }
 
+            // if there is an acquirable gap initially, then we should not 
move the startOffset
+            if (initialReadGapOffset != null && 
initialReadGapOffset.gapStartOffset() == startOffset) {
+                return;
+            }

Review Comment:
   Thanks for the review. This is not exactly what I meant here. This line of 
code suggests that if the initialReadGapOffset.gapStartOffset() == startOffset, 
i.e. there is an acquirable gap starting at the startOffset, we don't need to 
check anything because we cannot move the startOffset at all.



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