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

Consumer onPartitionsRevoked should not be invoked while holding the coordinator lock

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 0.10.1.0
    • consumer
    • None

    Description

      We have a single lock which is used for protecting access to shared coordinator state between the foreground thread and the background heartbeat thread. Currently, the onPartitionsRevoked callback is invoked while holding this lock, which prevents the heartbeat thread from sending any heartbeats. If the heartbeat thread is blocked for longer than the session timeout, than the consumer is kicked out of the group. Typically this is not a problem because onPartitionsRevoked might only commit offsets, but for Kafka Streams, there is some expensive cleanup logic which can take longer than the session timeout.

      Attachments

        Issue Links

          Activity

            People

              hachikuji Jason Gustafson
              hachikuji Jason Gustafson
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: