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

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

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.8.0
    • 0.8.1
    • None
    • 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.

      Attachments

        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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            swapnilghike Swapnil Ghike
            swapnilghike Swapnil Ghike
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment