0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 00:56:44 +01:00

SERVER-46624 Make sure config version is high enough in disallow_adding_initialized_node1.js

This commit is contained in:
William Schultz 2020-03-04 16:22:57 -05:00 committed by Evergreen Agent
parent a2eeeedb3e
commit 82424b7423

View File

@ -38,6 +38,11 @@ jsTestLog('Replica set A ID = ' + configA.settings.replicaSetId);
jsTestLog('Replica set B ID = ' + configB.settings.replicaSetId);
assert.neq(configA.settings.replicaSetId, configB.settings.replicaSetId);
// Increment the config version first on this node so that its version on the next reconfig will
// be higher than B's.
configA.version++;
assert.commandWorked(primaryA.adminCommand({replSetReconfig: configA}));
jsTestLog("Adding replica set B's primary " + primaryB.host + " to replica set A's config");
configA.version++;
configA.members.push({_id: 11, host: primaryB.host});