diff options
author | Jennifer Peshansky <jennifer.peshansky@mongodb.com> | 2021-09-21 19:08:06 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-09-30 21:29:42 +0000 |
commit | 17f21ec21c22168b3aa46beb55bc7d78848830a8 (patch) | |
tree | 8cca9e5c855646f3a592a51df40328a13c438a3d /jstests | |
parent | 70e319a707543052f46ef77f370e91252f50e968 (diff) | |
download | mongo-17f21ec21c22168b3aa46beb55bc7d78848830a8.tar.gz |
SERVER-59178 Re-enable SBE as the default execution engine
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/concurrency/fsm_workloads/find_flip_sbe_enabled.js | 23 | ||||
-rw-r--r-- | jstests/libs/sbe_util.js | 17 | ||||
-rw-r--r-- | jstests/noPassthrough/query_knobs_validation.js | 4 | ||||
-rw-r--r-- | jstests/noPassthrough/truncate_large_profiler_entry.js | 3 | ||||
-rw-r--r-- | jstests/noPassthroughWithMongod/group_pushdown.js | 4 |
5 files changed, 25 insertions, 26 deletions
diff --git a/jstests/concurrency/fsm_workloads/find_flip_sbe_enabled.js b/jstests/concurrency/fsm_workloads/find_flip_sbe_enabled.js index 4afccfa7d54..e6ef9570291 100644 --- a/jstests/concurrency/fsm_workloads/find_flip_sbe_enabled.js +++ b/jstests/concurrency/fsm_workloads/find_flip_sbe_enabled.js @@ -1,7 +1,7 @@ 'use strict'; /** - * Sets the internalQueryEnableSlotBasedExecutionEngine flag to true and false, and + * Sets the internalQueryForceClassicEngine flag to true and false, and * asserts that find queries using the plan cache produce the correct results. * * @tags: [ @@ -19,7 +19,7 @@ var $config = (function() { } cluster.executeOnMongodNodes(function(db) { - db.adminCommand({setParameter: 1, internalQueryEnableSlotBasedExecutionEngine: false}); + db.adminCommand({setParameter: 1, internalQueryForceClassicEngine: true}); }); for (let i = 0; i < 10; ++i) { @@ -33,11 +33,10 @@ var $config = (function() { let states = (function() { function init(db, coll) { - const originalParamValue = db.adminCommand( - {getParameter: 1, "internalQueryEnableSlotBasedExecutionEngine": 1}); + const originalParamValue = + db.adminCommand({getParameter: 1, "internalQueryForceClassicEngine": 1}); assertAlways.commandWorked(originalParamValue); - this.originalParamValue = - originalParamValue.internalQueryEnableSlotBasedExecutionEngine; + this.originalParamValue = originalParamValue.internalQueryForceClassicEngine; if (!checkSBEEnabled(db)) { return; @@ -50,8 +49,8 @@ var $config = (function() { return; } - assertAlways.commandWorked(db.adminCommand( - {setParameter: 1, internalQueryEnableSlotBasedExecutionEngine: true})); + assertAlways.commandWorked( + db.adminCommand({setParameter: 1, internalQueryForceClassicEngine: false})); } function toggleSBESwitchOff(db, coll) { @@ -59,8 +58,8 @@ var $config = (function() { return; } - assertAlways.commandWorked(db.adminCommand( - {setParameter: 1, internalQueryEnableSlotBasedExecutionEngine: false})); + assertAlways.commandWorked( + db.adminCommand({setParameter: 1, internalQueryForceClassicEngine: true})); } function runQueriesAndCheckResults(db, coll) { @@ -137,8 +136,8 @@ var $config = (function() { function teardown(db, coll, cluster) { const setParam = this.originalParamValue; cluster.executeOnMongodNodes(function(db) { - assertAlways.commandWorked(db.adminCommand( - {setParameter: 1, internalQueryEnableSlotBasedExecutionEngine: setParam})); + assertAlways.commandWorked( + db.adminCommand({setParameter: 1, internalQueryForceClassicEngine: setParam})); }); } diff --git a/jstests/libs/sbe_util.js b/jstests/libs/sbe_util.js index 89cf6af7aef..a47aa3a1130 100644 --- a/jstests/libs/sbe_util.js +++ b/jstests/libs/sbe_util.js @@ -10,7 +10,7 @@ load("jstests/libs/fixture_helpers.js"); // For 'isMongos' * sharded clusters, SBE is either enabled on each node, or disabled on each node. */ function checkSBEEnabled(theDB) { - let checkResult = false; + let checkResult = true; assert.soon(() => { // Some test suites kill the primary, potentially resulting in networking errors. We use: @@ -23,8 +23,8 @@ function checkSBEEnabled(theDB) { return false; } - // Find a non-mongos node and check whether its SBE feature flag is on. We assume either all - // nodes in the cluster have SBE on or none. + // Find a non-mongos node and check whether its forceClassicEngine flag is on. We + // assume either all nodes in the cluster have SBE disabled or none. for (const node of nodes) { try { const conn = new Mongo(node); @@ -32,11 +32,12 @@ function checkSBEEnabled(theDB) { continue; } - const getParam = conn.adminCommand( - {getParameter: 1, internalQueryEnableSlotBasedExecutionEngine: 1}); - checkResult = - getParam.hasOwnProperty("internalQueryEnableSlotBasedExecutionEngine") && - getParam.internalQueryEnableSlotBasedExecutionEngine; + const getParam = + conn.adminCommand({getParameter: 1, internalQueryForceClassicEngine: 1}); + if (getParam.hasOwnProperty("internalQueryForceClassicEngine") && + getParam.internalQueryForceClassicEngine) { + checkResult = false; + } return true; } catch (e) { continue; diff --git a/jstests/noPassthrough/query_knobs_validation.js b/jstests/noPassthrough/query_knobs_validation.js index 4a1f25c55a7..f7c9f52183d 100644 --- a/jstests/noPassthrough/query_knobs_validation.js +++ b/jstests/noPassthrough/query_knobs_validation.js @@ -198,8 +198,8 @@ assertSetParameterSucceeds("internalQuerySlotBasedExecutionMaxStaticIndexScanInt assertSetParameterFails("internalQuerySlotBasedExecutionMaxStaticIndexScanIntervals", 0); assertSetParameterFails("internalQuerySlotBasedExecutionMaxStaticIndexScanIntervals", -1); -assertSetParameterSucceeds("internalQueryEnableSlotBasedExecutionEngine", true); -assertSetParameterSucceeds("internalQueryEnableSlotBasedExecutionEngine", false); +assertSetParameterSucceeds("internalQueryForceClassicEngine", true); +assertSetParameterSucceeds("internalQueryForceClassicEngine", false); MongoRunner.stopMongod(conn); })(); diff --git a/jstests/noPassthrough/truncate_large_profiler_entry.js b/jstests/noPassthrough/truncate_large_profiler_entry.js index 1cf05c27d45..15cdbee5e44 100644 --- a/jstests/noPassthrough/truncate_large_profiler_entry.js +++ b/jstests/noPassthrough/truncate_large_profiler_entry.js @@ -5,8 +5,7 @@ (function() { "use strict"; -const conn = - MongoRunner.runMongod({setParameter: "internalQueryEnableSlotBasedExecutionEngine=true"}); +const conn = MongoRunner.runMongod(); assert.neq(null, conn, "mongod was unable to startup"); const db = conn.getDB("test"); const collName = jsTestName(); diff --git a/jstests/noPassthroughWithMongod/group_pushdown.js b/jstests/noPassthroughWithMongod/group_pushdown.js index a00d82ea7b9..2f036a0f291 100644 --- a/jstests/noPassthroughWithMongod/group_pushdown.js +++ b/jstests/noPassthroughWithMongod/group_pushdown.js @@ -48,7 +48,7 @@ let assertResultsMatchWithAndWithoutPushdown = function( assertGroupPushdown(coll, pipeline, expectedResults, expectedGroupCountInExplain); // Turn sbe off. - db.adminCommand({setParameter: 1, internalQueryEnableSlotBasedExecutionEngine: false}); + db.adminCommand({setParameter: 1, internalQueryForceClassicEngine: true}); // Sanity check the results when no pushdown happens. let resultNoGroupPushdown = coll.aggregate(pipeline).toArray(); @@ -56,7 +56,7 @@ let assertResultsMatchWithAndWithoutPushdown = function( // Turn sbe on which will allow $group stages that contain supported accumulators to be pushed // down under certain conditions. - db.adminCommand({setParameter: 1, internalQueryEnableSlotBasedExecutionEngine: true}); + db.adminCommand({setParameter: 1, internalQueryForceClassicEngine: false}); let resultWithGroupPushdown = coll.aggregate(pipeline).toArray(); assert.sameMembers(resultNoGroupPushdown, resultWithGroupPushdown); |