Uploaded image for project: 'controller'
  1. controller
  2. CONTROLLER-867

Clustering : Leader initializes commit index to last index

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • Helium
    • None
    • mdsal
    • None
    • Operating System: All
      Platform: All

    • 1978
    • High

    Description

      In the raft implementation when the Leader is created it's commit index is initialized to the last index in the log. This could be a problem in the following scenario.

      member-1 is a leader and it has commitIndex = 10 and lastIndex = 11
      member-2 is a follower and is has commitIndex = 10 and lastIndex = 11
      member-3 is a follower and it has commitIndex = 10 and lastIndex = 10

      member-1 dies before it can switch the commitIndex to 11 and therefore apply state and return a success to the client

      A new election occurs in which member-2 gets chosen as the leader. Now member-2 assumes that it's commitIndex = 11 even though it does not have consensus from member-3.

      Evaluate if this is a problem. One possible fix for it would be to not change the commitIndex on the new Leader at all and let it sync up with it's followers before resetting it's commit index.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kramesha@cisco.com Kamal Rameshan
            moraja@cisco.com Moiz Raja
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: