diff options
author | Moustafa Maher <m.maher@10gen.com> | 2021-08-11 19:09:34 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-08-12 19:05:52 +0000 |
commit | 05a7e410d067261ed8e940b7aa086a47502f45d1 (patch) | |
tree | c06fc8436b829d6be8a7495b39cebd7bb71f9045 /jstests/libs | |
parent | 38e3f094947220e8ef44db605aab2ab95a9b040e (diff) | |
download | mongo-05a7e410d067261ed8e940b7aa086a47502f45d1.tar.gz |
SERVER-59227 Remove featureFlagDefaultWriteConcernMajority
Diffstat (limited to 'jstests/libs')
-rw-r--r-- | jstests/libs/read_write_concern_defaults_propagation_common.js | 6 | ||||
-rw-r--r-- | jstests/libs/write_concern_util.js | 13 |
2 files changed, 2 insertions, 17 deletions
diff --git a/jstests/libs/read_write_concern_defaults_propagation_common.js b/jstests/libs/read_write_concern_defaults_propagation_common.js index b992593e9fc..8bf732466b0 100644 --- a/jstests/libs/read_write_concern_defaults_propagation_common.js +++ b/jstests/libs/read_write_concern_defaults_propagation_common.js @@ -1,8 +1,7 @@ var ReadWriteConcernDefaultsPropagation = (function() { "use strict"; - load("jstests/libs/write_concern_util.js"); // For isDefaultWriteConcernMajorityFlagEnabled. - load('jstests/replsets/rslib.js'); // For isDefaultReadConcernLocalFlagEnabled. + load('jstests/replsets/rslib.js'); // For isDefaultReadConcernLocalFlagEnabled. const kDefaultReadConcernField = "defaultReadConcern"; const kDefaultWriteConcernField = "defaultWriteConcern"; @@ -140,8 +139,7 @@ var ReadWriteConcernDefaultsPropagation = (function() { // Note localUpdateWallClockTime is generated by the in-memory cache, so it will be // present even if there are no defaults. const unexpectedFields = kDefaultRWCFields.concat(kExtraSetFields).filter(field => { - return (!isDefaultWriteConcernMajorityFlagEnabled(checkConn) || - field !== kDefaultWriteConcernField) && + return (field !== kDefaultWriteConcernField) && (!isDefaultReadConcernLocalFlagEnabled(checkConn) || field !== kDefaultReadConcernField); }); diff --git a/jstests/libs/write_concern_util.js b/jstests/libs/write_concern_util.js index 80c6593507a..fff2517c754 100644 --- a/jstests/libs/write_concern_util.js +++ b/jstests/libs/write_concern_util.js @@ -154,17 +154,4 @@ function runWriteConcernRetryabilityTest(priConn, secConn, cmd, kNodes, dbName, checkWriteConcernTimedOut(testDB2.runCommand(cmd)); restartServerReplication(secConn); -} - -// Check if featureFlagDefaultWriteConcernMajority is enabled. -function isDefaultWriteConcernMajorityFlagEnabled(conn) { - let res = conn.adminCommand({getParameter: 1, featureFlagDefaultWriteConcernMajority: 1}); - if (!res.ok) { - // Running with old version which doesn't have the flag. - if (res.errmsg == "no option found to get") - return false; - assert(false); - } - - return res.featureFlagDefaultWriteConcernMajority.value; }
\ No newline at end of file |