Kafka
  1. Kafka
  2. KAFKA-1152

ReplicaManager's handling of the leaderAndIsrRequest should gracefully handle leader == -1

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.0
    • Fix Version/s: 0.8.1
    • Component/s: None
    • Labels:
      None

      Description

      If a partition is created with replication factor 1, then the controller can set the partition's leader to -1 in leaderAndIsrRequest when the only replica of the partition is being bounced.

      The handling of this request with a leader == -1 throws an exception on the ReplicaManager which prevents the addition of fetchers for the remaining partitions in the leaderAndIsrRequest.

      After the replica is bounced, the replica first receives a leaderAndIsrRequest with leader == -1, then it receives another leaderAndIsrRequest with the correct leader (which is the replica itself) due to OfflinePartition to OnlinePartition state change.

      In handling the first request, ReplicaManager should ignore the partition for which the request has leader == -1, and continue addition of fetchers for the remaining partitions. The next leaderAndIsrRequest will take care of setting the correct leader for that partition.

      1. KAFKA-1152.patch
        5 kB
        Swapnil Ghike
      2. KAFKA-1152_2013-11-28_22:40:55.patch
        3 kB
        Swapnil Ghike
      3. KAFKA-1152_2013-11-28_10:19:05.patch
        3 kB
        Swapnil Ghike
      4. incremental.patch
        2 kB
        Swapnil Ghike

        Activity

        Swapnil Ghike created issue -
        Swapnil Ghike made changes -
        Field Original Value New Value
        Attachment KAFKA-1152.patch [ 12616200 ]
        Swapnil Ghike made changes -
        Attachment KAFKA-1152_2013-11-28_10:19:05.patch [ 12616296 ]
        Swapnil Ghike made changes -
        Attachment KAFKA-1152.patch [ 12616338 ]
        Swapnil Ghike made changes -
        Attachment KAFKA-1152_2013-11-28_22:40:55.patch [ 12616342 ]
        Swapnil Ghike made changes -
        Attachment KAFKA-1152.patch [ 12616338 ]
        Jun Rao made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Swapnil Ghike made changes -
        Attachment incremental.patch [ 12616839 ]

          People

          • Assignee:
            Swapnil Ghike
            Reporter:
            Swapnil Ghike
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development