apoorvmittal10 commented on code in PR #19759:
URL: https://github.com/apache/kafka/pull/19759#discussion_r2101744337


##########
core/src/main/java/kafka/server/share/DelayedShareFetch.java:
##########
@@ -191,26 +191,23 @@ public void onExpiration() {
      * Complete the share fetch operation by fetching records for all 
partitions in the share fetch request irrespective
      * of whether they have any acquired records. This is called when the 
fetch operation is forced to complete either
      * because records can be acquired for some partitions or due to MaxWaitMs 
timeout.
+     * <p>
+     * On operation timeout, onComplete is invoked, last try occurs to acquire 
partitions and read
+     * from log, if acquired. The fetch will only happen from local log and 
not remote storage, on
+     * operation expiration.

Review Comment:
   I thought about it but it complicates the code execution in 
DelayedShareFetch. Clearing partitionsAcquired alone is not sufficient, as 
there could be pending remote fetch as well which might need additional time to 
finish. Hence I didn't go with that approach.



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