[SERVER-28486] backup_restore.js should wait for FSM and CRUD operations to complete on all secondaries before getting current primary Created: 24/Mar/17  Updated: 30/Oct/17  Resolved: 24/Mar/17

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 3.4.11, 3.5.5

Type: Bug Priority: Major - P3
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Sprint: Repl 2017-03-27
Participants:
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



 Comments   
Comment by Githook User [ 30/Oct/17 ]

Author:

{'email': 'benety@mongodb.com', 'name': 'Benety Goh', 'username': 'benety'}

Message: SERVER-28486 backup_restore.js waits for FSM and CRUD operations to complete before getting primary

(cherry picked from commit 25562f3145033c8a63df8831c26e9525341ab0d4)
Branch: v3.4
https://github.com/mongodb/mongo/commit/b1f3343e2fb94a7cee47d0c4ed27c0f5c845376f

Comment by Githook User [ 24/Mar/17 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-28486 backup_restore.js waits for FSM and CRUD operations to complete before getting primary
Branch: master
https://github.com/mongodb/mongo/commit/25562f3145033c8a63df8831c26e9525341ab0d4

Generated at Thu Feb 08 04:18:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.