ableegoldman commented on a change in pull request #11600: URL: https://github.com/apache/kafka/pull/11600#discussion_r781817617
########## File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java ########## @@ -1137,6 +1138,8 @@ private void completeShutdown(final boolean cleanRun) { log.info("Shutting down"); + topologyMetadata.unregisterThread(threadMetadata.threadName()); Review comment: The `#addNamedTopology` or `#removeNamedTopology` APIs will block until all local threads have ack'ed the topology change. I moved the un-registration to the beginning of the shutdown to prevent it from hanging if we get stuck during one of the other cleanup tasks (IIRC there is an edge case bug in the producer that can cause it to hang permanently during #close), and also to avoid blocking unnecessarily while the thread completes its shutdown, since we don't care if a removed thread gets the update or not -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org