Fix Invariant upon failed request for a vote from the current primary in the election dry-run of catchup takeover

XMLWordPrintableJSON

    • Fully Compatible
    • ALL
    • v5.0, v4.4, v4.2, v4.0, v3.6
    • Repl 2021-06-14
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      We are vulnerable to reach to this Invariant following this scenario:

      1- A follower node called for a dry run election due to catchup takeover and sent primaryIndex to voteRequester to start scatter_and_gather_runner to send voteRequests to all voters.

      2- All Requests has been scheduled  with processResponse as callbacks 

      3- Primary node's response is the last response to be processed, which indicates that _callbacks list is empty.

      4- The request to the Primary Node failed so we end-up with failed response and we return leaving _primaryVote unchanged as  PrimaryVote::Pending.

      5- So the call to hasReceivedSufficientResponses will return false causing the Invariant to fire.

       

      Ask to add more diagnostic information: 
      Can we add primaryIndex to that log line to log what is the last known primaryIndex for this node while running for the dry-run catchup takeover.

              Assignee:
              Vishnu Kaushik
              Reporter:
              Moustafa Maher
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: