[
https://issues.apache.org/jira/browse/KAFKA-20869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18101080#comment-18101080
]
Yunseop Eom commented on KAFKA-20869:
-------------------------------------
PR opened: https://github.com/apache/kafka/pull/23022
Guarded KafkaStreams.addStreamThread so a global-only topology does not create
a local StreamThread when it has no local processing tasks. Added a regression
test covering Optional.empty() and the unchanged zero-local-thread invariant.
Validation: TDD RED reproduced the internal NullPointerException; GREEN
regression passed; :streams:check completed successfully.
Status: PR open and awaiting review.
> KafkaStreams#addStreamsThread crashed global-task-only client
> -------------------------------------------------------------
>
> Key: KAFKA-20869
> URL: https://issues.apache.org/jira/browse/KAFKA-20869
> Project: Kafka
> Issue Type: Bug
> Components: streams
> Reporter: Matthias J. Sax
> Priority: Minor
>
> KafkaStreams allows to run a "global only" topology. For this case,
> `KafkaStreams#start()` won't spin up any StreamsThreads (independent of
> `num.stream.threads` config) and only run the global-thread.
> However, addStreamsThread() has not guard for this case, and if called would
> create a new StreamThread which immediately crashes, taking down the whole
> client (with the default uncaught exception handler).
> It's even worse if the exception handler returns replace-thread, and we end
> up in an infinite error-loop...
--
This message was sent by Atlassian Jira
(v8.20.10#820010)