kamalcph commented on code in PR #14778:
URL: https://github.com/apache/kafka/pull/14778#discussion_r1395458516


##########
core/src/main/scala/kafka/server/ReplicaManager.scala:
##########
@@ -1338,7 +1338,8 @@ class ReplicaManager(val config: KafkaConfig,
         return Some(createLogReadResult(e))
     }
 
-    val remoteFetch = new DelayedRemoteFetch(remoteFetchTask, 
remoteFetchResult, remoteFetchInfo,
+    val timeout = config.requestTimeoutMs.toLong
+    val remoteFetch = new DelayedRemoteFetch(remoteFetchTask, 
remoteFetchResult, remoteFetchInfo, timeout,

Review Comment:
   Passing the full request timeout to the `DelayedRemoteFetch`, we can reduce 
the time spent by the handler from the `requestTimeout` to reach up-to here to 
expire the delayedRemoteFetch requests immediately if required.
   
   



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