[ 
https://issues.apache.org/jira/browse/KAFKA-20869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18101100#comment-18101100
 ] 

Yunseop Eom commented on KAFKA-20869:
-------------------------------------

Update on PR #23022: https://github.com/apache/kafka/pull/23022

The PR prevents KafkaStreams.addStreamThread from creating a local StreamThread 
for a global-only topology and adds regression coverage asserting 
Optional.empty() with no new local thread.

TDD RED/GREEN verification and :streams:check pass locally. The PR is open and 
awaiting maintainer 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)

Reply via email to