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


##########
core/src/main/java/kafka/server/share/SharePartition.java:
##########
@@ -1825,8 +1921,8 @@ private boolean canMoveStartOffset() {
 
         NavigableMap.Entry<Long, InFlightBatch> entry = 
cachedState.floorEntry(startOffset);
         if (entry == null) {
-            log.error("The start offset: {} is not found in the cached state 
for share partition: {}-{}."
-                + " Cannot move the start offset.", startOffset, groupId, 
topicIdPartition);
+            log.info("The start offset: {} is not found in the cached state 
for share partition: {}-{} " +
+                "as there is an acquirable gap at the beginning. Cannot move 
the start offset.", startOffset, groupId, topicIdPartition);
             return false;

Review Comment:
   This scenario can only occur during share partition initialization when 
there is a gap right from the startOffset, that's exactly when the entry will 
be null (no state batch contains the start offset). Uptill now it was assumed 
that this could not happen, and if this happened, then there should be some 
error. But it's not an error anymore and it's a completely plausible scenario 
is a normal situation, so changed the log level as well.



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