Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-5027 Kafka Controller Redesign
  3. KAFKA-1120

Controller could miss a broker state change

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.1
    • Fix Version/s: 2.2.0
    • Component/s: core
    • Labels:

      Description

      When the controller is in the middle of processing a task (e.g., preferred leader election, broker change), it holds a controller lock. During this time, a broker could have de-registered and re-registered itself in ZK. After the controller finishes processing the current task, it will start processing the logic in the broker change listener. However, it will see no broker change and therefore won't do anything to the restarted broker. This broker will be in a weird state since the controller doesn't inform it to become the leader of any partition. Yet, the cached metadata in other brokers could still list that broker as the leader for some partitions. Client requests routed to that broker will then get a TopicOrPartitionNotExistException. This broker will continue to be in this bad state until it's restarted again.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hzxa21 Zhanxiang (Patrick) Huang
                Reporter:
                junrao Jun Rao
              • Votes:
                7 Vote for this issue
                Watchers:
                22 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: