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()

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.4.3, 3.5.4
    • Affects Version/s: None
    • Component/s: Replication
    • Labels:
    • Fully Compatible
    • v3.4
    • Repl 2017-03-06
    • 0

      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.

            judah.schvimer@mongodb.com Judah Schvimer
            judah.schvimer@mongodb.com Judah Schvimer
            0 Vote for this issue
            3 Start watching this issue