diff options
author | Mihai Andrei <mihai.andrei@10gen.com> | 2022-05-27 16:45:12 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-05-27 17:59:56 +0000 |
commit | aa40f5e7c0d821915c6225c1eb2001124857d62d (patch) | |
tree | 81b088d77ec5b2c598b45badc552ea7813d73b10 /jstests/core/wildcard_index_cached_plans.js | |
parent | 3e717f0b3ec91d4937363d71b2ee7cc0c20a6221 (diff) | |
download | mongo-aa40f5e7c0d821915c6225c1eb2001124857d62d.tar.gz |
SERVER-66583 Re-enable SBE as the default execution engine and fall back to classic if no SBE compatible $group or $lookup exists
Diffstat (limited to 'jstests/core/wildcard_index_cached_plans.js')
-rw-r--r-- | jstests/core/wildcard_index_cached_plans.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/jstests/core/wildcard_index_cached_plans.js b/jstests/core/wildcard_index_cached_plans.js index 7ca356726c1..9b0b0c33b6d 100644 --- a/jstests/core/wildcard_index_cached_plans.js +++ b/jstests/core/wildcard_index_cached_plans.js @@ -29,6 +29,8 @@ coll.drop(); assert.commandWorked(coll.createIndex({"b.$**": 1})); assert.commandWorked(coll.createIndex({"a": 1})); +const sbePlanCacheEnabled = checkSBEEnabled(db, ["featureFlagSbePlanCache", "featureFlagSbeFull"]); + // In order for the plan cache to be used, there must be more than one plan available. Insert // data into the collection such that the b.$** index will be far more selective than the index // on 'a' for the query {a: 1, b: 1}. @@ -70,7 +72,7 @@ for (let i = 0; i < 2; i++) { let cacheEntry = getCacheEntryForQuery(query); assert.neq(cacheEntry, null); assert.eq(cacheEntry.isActive, true); -if (!checkSBEEnabled(db, ["featureFlagSbePlanCache"])) { +if (!sbePlanCacheEnabled) { // Should be at least two plans: one using the {a: 1} index and the other using the b.$** index. assert.gte(cacheEntry.creationExecStats.length, 2, tojson(cacheEntry.plans)); @@ -123,7 +125,7 @@ assert.neq(getPlanCacheKeyFromShape({query: queryWithBNull, collection: coll, db // There should only have been one solution for the above query, so it would get cached only by the // SBE plan cache. cacheEntry = getCacheEntryForQuery({a: 1, b: null}); -if (checkSBEEnabled(db, ["featureFlagSbePlanCache"])) { +if (sbePlanCacheEnabled) { assert.neq(cacheEntry, null); assert.eq(cacheEntry.isActive, true, cacheEntry); assert.eq(cacheEntry.isPinned, true, cacheEntry); |