hachikuji commented on a change in pull request #11097:
URL: https://github.com/apache/kafka/pull/11097#discussion_r673563708
##########
File path: core/src/main/scala/kafka/server/AbstractFetcherThread.scala
##########
@@ -317,10 +317,6 @@ abstract class AbstractFetcherThread(name: String,
warn(s"Error in response for fetch request $fetchRequest", t)
inLock(partitionMapLock) {
partitionsWithError ++= partitionStates.partitionSet.asScala
- // there is an error occurred while fetching partitions, sleep a
while
Review comment:
I think this makes sense. Because we are adding all partitions to
`partitionsWithError`, then each partition will get a delay. That means that we
are likely to hit the condition in `maybeFetch`:
```scala
if (fetchRequestOpt.isEmpty) {
trace(s"There are no active partitions. Back off for $fetchBackOffMs
ms before sending a fetch request")
partitionMapCond.await(fetchBackOffMs, TimeUnit.MILLISECONDS)
}
```
I think it's worth writing a test case for this scenario. Basically ensure
that no fetches are sent for `fetchBackOffMs` after a failure.
--
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]