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


##########
core/src/main/java/kafka/server/share/DelayedShareFetch.java:
##########
@@ -248,14 +250,18 @@ private void 
processAcquiredTopicPartitionsForLocalLogFetch(LinkedHashMap<TopicI
                 // updated in a different tryComplete thread.
                 responseData = combineLogReadResponse(topicPartitionData, 
localPartitionsAlreadyFetched);
 
+            
resetFetchOffsetMetadataForRemoteFetchPartitions(topicPartitionData, 
responseData);

Review Comment:
   this method call is required to reset the fetch offset metadata for topic 
partitions which might be having local log fetch during tryComplete, but 
changes to remote storage fetch in onComplete. Basically during tryComplete, we 
deduced that this share fetch request only contained local log fetch topic 
partitions, however during onComplete some of those local log fetch changed to 
remote storage fetch. The scenario where this creates the problem has been 
explained in this comment 
[here](https://github.com/apache/kafka/pull/19592/files#diff-d835cdc01e77905316584ce9e6e21a060cb3d36efa717d4b822b16744e4d713aR282).
 



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