Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-55465

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

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              vishnu.kaushik@mongodb.com Vishnu Kaushik
              m.maher@mongodb.com Moustafa Maher
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: