From 82424b742342d4b35cf10eb9d471984d1e805210 Mon Sep 17 00:00:00 2001 From: William Schultz Date: Wed, 4 Mar 2020 16:22:57 -0500 Subject: [PATCH] SERVER-46624 Make sure config version is high enough in disallow_adding_initialized_node1.js --- jstests/replsets/disallow_adding_initialized_node1.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jstests/replsets/disallow_adding_initialized_node1.js b/jstests/replsets/disallow_adding_initialized_node1.js index d9b953d874a..4773c4031bd 100644 --- a/jstests/replsets/disallow_adding_initialized_node1.js +++ b/jstests/replsets/disallow_adding_initialized_node1.js @@ -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});