summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSpencer T Brody <spencer@mongodb.com>2015-12-22 17:06:40 -0500
committerSpencer T Brody <spencer@mongodb.com>2015-12-23 14:46:34 -0500
commitff42cf8a28728cd494bdc84f4bf568af0efe87b4 (patch)
tree5e0960171e1b14d579db4c2251b6b2d40d088943
parent3905aa7b425fee814d67dd9ea8fb1ec13f3ecd2f (diff)
downloadmongo-ff42cf8a28728cd494bdc84f4bf568af0efe87b4.tar.gz
SERVER-21996 Wait for replication to all nodes before shutting down config server primary in testr3.2.1-rc1
(cherry picked from commit ae83937130d1abc097e2694de97bf9ea59ed2f32)
-rw-r--r--jstests/sharding/replset_config/autodiscover_config_rs_from_secondary.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/jstests/sharding/replset_config/autodiscover_config_rs_from_secondary.js b/jstests/sharding/replset_config/autodiscover_config_rs_from_secondary.js
index eb26f0f11ba..d0c4e84d8bd 100644
--- a/jstests/sharding/replset_config/autodiscover_config_rs_from_secondary.js
+++ b/jstests/sharding/replset_config/autodiscover_config_rs_from_secondary.js
@@ -25,6 +25,10 @@ var seedList = rst.name + "/" + rst.nodes[1].host; // node 1 is guaranteed to no
MongoRunner.stopMongos(mongos);
}
+// Wait for replication to all config server replica set members to ensure that mongos
+// doesn't read from a stale config server when trying to verify if the initial cluster metadata
+// has been properly written.
+rst.awaitReplication();
// Now take down the one electable node
rst.stop(0);
rst.awaitNoPrimary();