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

Consumer onPartitionsRevoked should not be invoked while holding the coordinator lock

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.10.1.0
    • Component/s: consumer
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: