You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Greg Harris (Jira)" <ji...@apache.org> on 2020/05/05 03:53:00 UTC

[jira] [Created] (KAFKA-9955) Exceptions thrown from SinkTask::close shadow other exceptions

Greg Harris created KAFKA-9955:
----------------------------------

             Summary: Exceptions thrown from SinkTask::close shadow other exceptions
                 Key: KAFKA-9955
                 URL: https://issues.apache.org/jira/browse/KAFKA-9955
             Project: Kafka
          Issue Type: Bug
          Components: KafkaConnect
    Affects Versions: 0.10.0.0
            Reporter: Greg Harris
            Assignee: Greg Harris


If an exception is thrown from SinkTask::close, the exception will shadow any other previous exception, because SinkTask::close is called from within a finally block.

Steps to reproduce:
 # Throw an exception from SinkTask::start or SinkTask::putĀ 
 # Throw an exception from SinkTask::close

Expected behavior:
 * All exceptions are visible in separate log messages
 * The error from SinkTask::start or SinkTask::put is logged as the exception that caused the task to stop.

Actual behavior:
 * The exception from SinkTask::close is logged as the exception that caused the task to stop.
 * The exceptions from either SinkTask::start or SinkTask::put are swallowed and don't appear in the logs at all.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)