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

backup_restore.js should wait for FSM and CRUD operations to complete on all secondaries before getting current primary

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.4.11, 3.5.5
    • Affects Version/s: None
    • Component/s: Replication
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Repl 2017-03-27
    • 0

      After stopping the FSM and CRUD clients, this test should call ReplSetTest.awaitReplication() before querying the current primary with awaitNodesAgreeOnPrimary() and getPrimary():

      jstests/noPassthrough/libs/backup_restore.js:360

      backup_restore.js
              // Wait up to 5 minutes until the new hidden node is in state SECONDARY.
              rst.waitForState(hiddenNode, ReplSetTest.State.SECONDARY);
      
              // Wait for secondaries to finish catching up before shutting down.
              rst.awaitNodesAgreeOnPrimary();
              primary = rst.getPrimary();
              assert.writeOK(primary.getDB("test").foo.insert(
                  {}, {writeConcern: {w: rst.nodes.length, wtimeout: 10 * 60 * 1000}}));
      
              // Stop set.
              rst.stopSet();
      
      

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            benety.goh@mongodb.com Benety Goh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: