Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-16061 KRaft JBOD follow-ups and improvements
  3. KAFKA-16297

Race condition while promoting future replica can lead to partition unavailability.

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.7.0
    • 3.8.0, 3.7.1
    • jbod
    • None

    Description

      KIP-858 proposed that when a directory failure occurs after changing the assignment of a replica that's moved between two directories in the same broker, but before the future replica promotion completes, the broker should reassign the replica to inform the controller of its correct status. But this hasn't yet been implemented, and without it this failure may lead to indefinite partition unavailability.

      Example scenario:

      1. A broker which leads partition P receives a request to alter the replica from directory A to directory B.
      2. The broker creates a future replica in directory B and starts a replica fetcher.
      3. Once the future replica first catches up, the broker queues a reassignment to inform the controller of the directory change.
      4. The next time the replica catches up, the broker briefly blocks appends and promotes the replica. However, before the promotion is attempted, directory A fails.
      5. The controller was informed that P in now in directory B before it received the notification that directory A has failed, so it does not elect a new leader, and as long as the broker is online, partition A remains unavailable.

       

       

      Attachments

        Issue Links

          Activity

            People

              soarez Igor Soarez
              soarez Igor Soarez
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: