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

Guarantee that replicaset is stable with node 0 as primary after ReplSetTest.initiate()

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4.3, 3.5.4
    • Component/s: Replication
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Backport Requested:
      v3.4
    • Sprint:
      Repl 2017-03-06
    • Linked BF Score:
      0

      Description

      reconfig can occasionally lead to the primary stepping down. This means that the guarantee we thought SERVER-20844 gave us, of being a stable replicaset with node 0 as primary, is not always guaranteed. To address this, we should call awaitNodesAgreeOnPrimary() and then make sure that node 0 is the primary. If it is not, we should step up node 0 to primary. In PV1 we can use replSetStepUp on node 0 to accomplish this. In PV0, we can repeatedly call replSetStepDown on the primary with a high step down timeout until node 0 is elected. At that point we can call replSetFreeze on every node with a freeze timeout of 0 to allow them all to run for election immediately if they want to.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: