[SERVER-28191] replmonitor_bad_seed.js should await primary node before writing to shard Created: 03/Mar/17  Updated: 06/Dec/17  Resolved: 04/May/17

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 3.5.7

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

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2017-05-08
Participants:
Linked BF Score: 0

 Description   

replmonitor_bad_seed.js waits for the replica set nodes to be reachable but if a primary is not available (due to step downs for example), the write to the shard may fail:

    // Verify that the replSetMonitor can reach the restarted set
    awaitRSClientHosts(st.s0, replTest.nodes, {ok: true});
 
    assert.writeOK(st.s0.getDB('test').user.insert({x: 1}));

We should call ReplSetTest.awaitNodesAgreeOnPrimary on the replica set before executing the sharded write.



 Comments   
Comment by Githook User [ 04/May/17 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-28191 Wait for a healthy primary in replmonitor_bad_seed.js test before issuing a write
Branch: master
https://github.com/mongodb/mongo/commit/5a247871d2dc7d1a46f4741e21c0edd8fc6abea1

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