Browse Source

KAFKA-4319; Parallelize shutdown of fetchers in AbstractFetcherManager to speedup shutdown

Author: Alexey Ozeritsky <aozeritsky@yandex-team.ru>

Reviewers: Ismael Juma <ismael@juma.me.uk>, Jason Gustafson <jason@confluent.io>

Closes #2023 from resetius/AbstractFetcherManager-shutdown-speedup
pull/2038/merge
Alexey Ozeritsky 8 years ago committed by Jason Gustafson
parent
commit
332b8b9afd
  1. 4
      core/src/main/scala/kafka/server/AbstractFetcherManager.scala

4
core/src/main/scala/kafka/server/AbstractFetcherManager.scala

@ -118,6 +118,10 @@ abstract class AbstractFetcherManager(protected val name: String, clientId: Stri @@ -118,6 +118,10 @@ abstract class AbstractFetcherManager(protected val name: String, clientId: Stri
def closeAllFetchers() {
mapLock synchronized {
for ( (_, fetcher) <- fetcherThreadMap) {
fetcher.initiateShutdown()
}
for ( (_, fetcher) <- fetcherThreadMap) {
fetcher.shutdown()
}

Loading…
Cancel
Save