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

Sink tasks should not throw WakeupException on shutdown

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0, 2.0.1, 2.1.0, 2.2.0, 2.1.1, 2.3.0, 2.2.1, 2.2.2, 2.4.0, 2.3.1, 2.5.0, 2.4.1, 2.6.0
    • 2.7.0
    • connect
    • None

    Description

      • As is noted in the Javadocs for that method, “If no thread is blocking in a method which can throw org.apache.kafka.common.errors.WakeupException, the next call to such a method will raise it instead.”
      • It just so happens that, if the framework isn’t in the middle of a call to the consumer and then the task gets stopped, the next call the framework will make on the consumer may be to commit offsets, which will immediately throw a WakeupException.
      • Currently, the framework handles this by immediately retrying the offset commit until it either throws a different exception or succeeds, and then throwing the original WakeupException. If this synchronous commit of offsets occurs during task shutdown (as opposed to in response to a consumer rebalance), it's unnecessary to throw the WakeupException back to the caller, and can cause alarming ERROR-level messages to get logged by the worker.

      Attachments

        Issue Links

          Activity

            People

              ChrisEgerton Chris Egerton
              ChrisEgerton Chris Egerton
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: