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

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4.11, 3.5.5
    • Component/s: Replication
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Completed:
    • Sprint:
      Repl 2017-03-27
    • Linked BF Score:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: