lh0156 opened a new pull request, #23022: URL: https://github.com/apache/kafka/pull/23022
### Summary Prevent KafkaStreams#addStreamThread from creating a local StreamThread when the topology has no local processing tasks. ### Motivation Global-only topologies intentionally start with zero local StreamThreads, even when num.stream.threads is configured with a positive value. Calling addStreamThread after startup must preserve that topology invariant; otherwise it creates a StreamThread that cannot build local tasks and can crash the client or repeatedly trigger thread replacement. ### Testing - Added a regression test for a running global-only client that verifies no StreamThread is created and addStreamThread returns Optional.empty(). - Verified the test fails before the fix because addStreamThread creates a StreamThread and reaches an internal NullPointerException. - ./gradlew :streams:check --no-build-cache --console=plain Fixes KAFKA-20869 -- 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]
