summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorAntonio Fuschetto <antonio.fuschetto@mongodb.com>2023-02-13 07:40:30 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-02-13 08:46:33 +0000
commitb5f7f35d46dab278abac976afe48ebf9632572b1 (patch)
tree4e1d2a472bbac9859c85c1a84e033d3c8f6ca76f /jstests
parent96399bf635e3916f9d5bc87ad2b3876eb89350a9 (diff)
downloadmongo-b5f7f35d46dab278abac976afe48ebf9632572b1.tar.gz
SERVER-73890 Only run the resilient movePrimary in random_DDL_operations.js FSM
Diffstat (limited to 'jstests')
-rw-r--r--jstests/concurrency/fsm_workloads/random_DDL_operations.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/jstests/concurrency/fsm_workloads/random_DDL_operations.js b/jstests/concurrency/fsm_workloads/random_DDL_operations.js
index bb45b8e93eb..6cc71e03de0 100644
--- a/jstests/concurrency/fsm_workloads/random_DDL_operations.js
+++ b/jstests/concurrency/fsm_workloads/random_DDL_operations.js
@@ -10,6 +10,8 @@
* ]
*/
+load('jstests/libs/feature_flag_util.js');
+
const dbPrefix = jsTestName() + '_DB_';
const dbCount = 2;
const collPrefix = 'sharded_coll_';
@@ -62,6 +64,10 @@ var $config = (function() {
]);
},
movePrimary: function(db, collName, connCache) {
+ if (this.skipMovePrimary) {
+ return;
+ }
+
db = getRandomDb(db);
const shardId = getRandomShard(connCache);
@@ -91,6 +97,10 @@ var $config = (function() {
};
let setup = function(db, collName, connCache) {
+ // TODO (SERVER-71309): Remove once 7.0 becomes last LTS. Prevent non-resilient movePrimary
+ // operations from being executed in multiversion suites.
+ this.skipMovePrimary = !FeatureFlagUtil.isEnabled(db.getMongo(), 'ResilientMovePrimary');
+
for (var i = 0; i < dbCount; i++) {
const dbName = dbPrefix + i;
const newDb = db.getSiblingDB(dbName);
@@ -116,7 +126,7 @@ var $config = (function() {
startState: 'create',
states: states,
transitions: transitions,
- data: {},
+ data: {skipMovePrimary: false},
setup: setup,
teardown: teardown,
passConnectionCache: true