summaryrefslogtreecommitdiff
path: root/jstests/libs
diff options
context:
space:
mode:
authorRuoxin Xu <ruoxin.xu@mongodb.com>2021-09-07 11:17:00 +0100
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-10-01 15:47:47 +0000
commitb72d07a8b0f1f5d5935ae039196e9cd6531b3406 (patch)
treeed6a4d37fc0cf3a294b9a0cab3060459c4819972 /jstests/libs
parentfc05532015895c8907437ea0c06fe83ab6c6f1dc (diff)
downloadmongo-b72d07a8b0f1f5d5935ae039196e9cd6531b3406.tar.gz
SERVER-59681 Start storing SBE plans in the new plan cache
Diffstat (limited to 'jstests/libs')
-rw-r--r--jstests/libs/sbe_util.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/jstests/libs/sbe_util.js b/jstests/libs/sbe_util.js
index a47aa3a1130..bb9bdd0d1b7 100644
--- a/jstests/libs/sbe_util.js
+++ b/jstests/libs/sbe_util.js
@@ -8,8 +8,9 @@ load("jstests/libs/fixture_helpers.js"); // For 'isMongos'
/**
* Returns whether or not SBE is enabled for the given connection. Assumes that for repl sets and
* sharded clusters, SBE is either enabled on each node, or disabled on each node.
+ * If 'featureFlags' is non-empty, checks if SBE and all the feature flags are enabled.
*/
-function checkSBEEnabled(theDB) {
+function checkSBEEnabled(theDB, featureFlags = []) {
let checkResult = true;
assert.soon(() => {
@@ -32,6 +33,12 @@ function checkSBEEnabled(theDB) {
continue;
}
+ featureFlags.forEach(function(featureFlag) {
+ const featureFlagParam = conn.adminCommand({getParameter: 1, [featureFlag]: 1});
+ checkResult = checkResult && featureFlagParam.hasOwnProperty(featureFlag) &&
+ featureFlagParam[featureFlag]["value"];
+ });
+
const getParam =
conn.adminCommand({getParameter: 1, internalQueryForceClassicEngine: 1});
if (getParam.hasOwnProperty("internalQueryForceClassicEngine") &&