showuon commented on code in PR #20045: URL: https://github.com/apache/kafka/pull/20045#discussion_r2184537279
########## core/src/main/scala/kafka/server/ReplicaManager.scala: ########## @@ -1598,31 +1601,40 @@ class ReplicaManager(val config: KafkaConfig, }) } catch { case e: RejectedExecutionException => - // Return the error if any in scheduling the remote fetch task - warn("Unable to fetch data from remote storage", e) - return Some(createLogReadResult(e)) + warn(s"Unable to fetch data from remote storage for remoteFetchInfo: $remoteFetchInfo", e) + // Store the error in RemoteLogReadResult if any in scheduling the remote fetch task. + // It will be sent back to the client in DelayedRemoteFetch along with other successful remote fetch results. + remoteFetchResult.complete(new RemoteLogReadResult(Optional.empty, Optional.of(e))) + delayedRemoteFetchPurgatory.checkAndComplete(key) Review Comment: You're right! This should be removed. Thanks for catching it. -- 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