Matthias J. Sax created KAFKA-19930:
---------------------------------------

             Summary: GlobalThread fails with NPE trying to use unsupported 
ProcessingExceptionHandler
                 Key: KAFKA-19930
                 URL: https://issues.apache.org/jira/browse/KAFKA-19930
             Project: Kafka
          Issue Type: Bug
          Components: streams
    Affects Versions: 3.9.0
            Reporter: Matthias J. Sax


We introduced a new `ProcessingExceptionHandler` with 
[KIP-1033|https://cwiki.apache.org/confluence/display/KAFKA/KIP-1033%3A+Add+Kafka+Streams+exception+handler+for+exceptions+occurring+during+processing]
 which was not intended to work with global Processors.

While we might want to change this, and potentially include the GlobalThread 
(even if it would be more difficult for the follow up DLQ work, because the 
GlobalThread does not have a producer...), there is a real bug in the 
implementation: if a `Processor` on the global thread throws an exception, we 
try to use the processing exception handler, however, it was never set up, and 
we fail with a NPE trying to call 
`processingExceptionHandler.handlerError(...)` inside 
`ProcessorNode#process(...)`.

This ticket is really just about fixing the NPE, and check if the handler is 
set, and if not, just rethrow any exception bubbling up from the user code, and 
let the global thread die (ie, let the user exception bubble up into the 
uncaught exception handler).

We should also update the docs, calling out that this handler does not apply to 
the global thread.

If we want to make the processing-exception-handler work properly with the 
global thread, we should file a new ticket, as it would require proper design.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to