Hi Kafka community??
I view the source code of kafka.network.Acceptor#acceptNewConnections and found
that retriesLeft may be less than 0.
This maybe cause a loop when the newConnections queue in the processor is full.
My idea is to make the following changes:
do {
processor =
synchronized {
retriesLeft -= 1
// adjust the
index (if necessary) and retrieve the processor atomically for
// correct
behaviour in case the number of processors is reduced dynamically
currentProcessorIndex = currentProcessorIndex % processors.length
processors(currentProcessorIndex)
}
currentProcessorIndex
+= 1
} while
(!assignNewConnection(socketChannel, processor, retriesLeft == 0))
Hope someone can give me advice.
thanks.