Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-9955

Exceptions thrown from SinkTask::close shadow other exceptions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.10.0.0
    • 2.3.2, 2.6.0, 2.4.2, 2.5.1
    • connect
    • None

    Description

      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:

      1. Throw an exception from SinkTask::start or SinkTask::putĀ 
      2. 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.

      Attachments

        Issue Links

          Activity

            People

              gharris1727 Greg Harris
              gharris1727 Greg Harris
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: