-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Query Execution
-
None
-
Fully Compatible
-
Query Execution 2021-05-03
Currently we use the following patten in jstests when we need to figure out if we're in SBE mode or not:
const isSBEEnabled = (() => { const getParam = db.adminCommand({getParameter: 1, featureFlagSBE: 1}); return getParam.hasOwnProperty("featureFlagSBE") && getParam.featureFlagSBE.value; })();
We should replace this boilerplate code with a helper function instead.
Also, as ian.boros pointed out, this check wouldn't work in a sharded cluster in certain configurations. Namely, when db is using a connection to mongos which doesn't have the feature flag enabled.