diff options
author | A. Jesse Jiryu Davis <jesse@mongodb.com> | 2020-01-25 02:28:44 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2020-01-25 02:28:44 +0000 |
commit | 38ec223f7478be14fc3bf082643a1109efaeb57c (patch) | |
tree | 539528e37fc62fb1042024aeeb181620d3d70798 | |
parent | 27c44d402377e9b716d3106ef8fcca56dcb0de97 (diff) | |
download | mongo-38ec223f7478be14fc3bf082643a1109efaeb57c.tar.gz |
SERVER-45765 Race in initiateWithAnyNodeAsPrimary
If there's an election between the call to replSetInitiate and the last call to
replSetReconfig, the test would nevertheless expect Node 0 to be primary and
all others to be secondaries. Fix it so will continue as soon as all nodes are
primary, secondary, or arbiter.
Also add resource_intensive tag to a test that starts 12 nodes.
-rw-r--r-- | jstests/replsets/replsettest_control_12_nodes.js | 3 | ||||
-rw-r--r-- | src/mongo/shell/replsettest.js | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/jstests/replsets/replsettest_control_12_nodes.js b/jstests/replsets/replsettest_control_12_nodes.js index fd6d6e75c60..2302e473666 100644 --- a/jstests/replsets/replsettest_control_12_nodes.js +++ b/jstests/replsets/replsettest_control_12_nodes.js @@ -9,6 +9,9 @@ * We use 12 replica set nodes because we consider that to be a reasonable scalability limit for * ReplSetTest. We expect the large majority of tests will never use more than this number of nodes, * and so we're not particularly worried about scaling beyond that point. + * + * @tags: [resource_intensive] + * */ (function() { // There are a limited number of voting nodes allowed in a replica set. We use as many voting nodes diff --git a/src/mongo/shell/replsettest.js b/src/mongo/shell/replsettest.js index d0766c2c9f1..8e7656fc0aa 100644 --- a/src/mongo/shell/replsettest.js +++ b/src/mongo/shell/replsettest.js @@ -1248,7 +1248,8 @@ var ReplSetTest = function(opts) { // Wait for initial sync to complete on all nodes. Use a faster polling interval so we can // detect initial sync completion more quickly. - this.awaitSecondaryNodes(self.kDefaultTimeoutMS, self._slaves, 25 /* retryIntervalMS */); + this.awaitSecondaryNodes( + self.kDefaultTimeoutMS, null /* slaves */, 25 /* retryIntervalMS */); print("ReplSetTest initiate reconfig and awaitSecondaryNodes took " + (new Date() - reconfigStart) + "ms for " + this.nodes.length + " nodes in set '" + this.name + "'"); |