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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.4.11, 3.5.5
    • Replication
    • None
    • Fully Compatible
    • ALL
    • Repl 2017-03-27
    • 0

    Description

      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

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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: