satishd commented on code in PR #15014:
URL: https://github.com/apache/kafka/pull/15014#discussion_r1426937685
##########
core/src/main/scala/kafka/server/DelayedRemoteFetch.scala:
##########
@@ -79,7 +80,12 @@ class DelayedRemoteFetch(remoteFetchTask: Future[Void],
override def onExpiration(): Unit = {
// cancel the remote storage read task, if it has not been executed yet
val cancelled = remoteFetchTask.cancel(true)
- if (!cancelled) debug(s"Remote fetch task for for RemoteStorageFetchInfo:
$remoteFetchInfo could not be cancelled and its isDone value is
${remoteFetchTask.isDone}")
+ if (!cancelled) debug(s"Remote fetch task for RemoteStorageFetchInfo:
$remoteFetchInfo could not be cancelled and its isDone value is
${remoteFetchTask.isDone}")
+
+ if (fetchParams.isFromFollower)
Review Comment:
I understand it is a defensive check and this instance is never created if
it is a follower fetch. If we want a defensive check, it should be created when
`DelayedRemoteFetch` is created instead of creating it in this callback.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]