diff --git a/core/src/main/scala/kafka/server/AbstractFetcherThread.scala b/core/src/main/scala/kafka/server/AbstractFetcherThread.scala index 162c749..48100f4 100644 --- a/core/src/main/scala/kafka/server/AbstractFetcherThread.scala +++ b/core/src/main/scala/kafka/server/AbstractFetcherThread.scala @@ -152,9 +152,11 @@ abstract class AbstractFetcherThread(name: String, clientId: String, sourceBroke partitionsWithError += topicAndPartition } case _ => - warn("error for partition [%s,%d] to broker %d".format(topic, partitionId, sourceBroker.id), - ErrorMapping.exceptionFor(partitionData.error)) - partitionsWithError += topicAndPartition + if (isRunning.get) { + warn("error for partition [%s,%d] to broker %d".format(topic, partitionId, sourceBroker.id), + ErrorMapping.exceptionFor(partitionData.error)) + partitionsWithError += topicAndPartition + } } } }