summaryrefslogtreecommitdiff
path: root/jstests/core
diff options
context:
space:
mode:
authorDavid Storch <david.storch@mongodb.com>2023-03-30 20:09:21 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-03-30 21:19:19 +0000
commit6afa8dd2bb3435e3632375a545d8a2c76a1cd620 (patch)
tree38e01544af80237eaafb3e137b9600891181d148 /jstests/core
parentac4380797e499bf24de13e1fa0d3f1d8d4b8ca70 (diff)
downloadmongo-6afa8dd2bb3435e3632375a545d8a2c76a1cd620.tar.gz
SERVER-72486 Enable all features supported in SBE by default
'featureFlagSbeFull' remains off by default but after this change has no function. We plan to re-use it in upcoming projects to flag-guard extensions to the SBE engine while they are under development.
Diffstat (limited to 'jstests/core')
-rw-r--r--jstests/core/columnstore/column_scan_skip_row_store_projection.js3
-rw-r--r--jstests/core/columnstore/column_store_index_compression.js3
-rw-r--r--jstests/core/columnstore/column_store_projection.js3
-rw-r--r--jstests/core/columnstore/columnstore_eligibility.js26
-rw-r--r--jstests/core/columnstore/columnstore_index.js3
-rw-r--r--jstests/core/columnstore/columnstore_index_correctness.js3
-rw-r--r--jstests/core/columnstore/columnstore_index_per_path_filters.js3
-rw-r--r--jstests/core/columnstore/columnstore_large_array_index_correctness.js3
-rw-r--r--jstests/core/columnstore/columnstore_validindex.js1
-rw-r--r--jstests/core/query/explode_for_sort_plan_cache.js8
-rw-r--r--jstests/core/sbe_plan_cache_autoparameterize_collscan.js58
11 files changed, 43 insertions, 71 deletions
diff --git a/jstests/core/columnstore/column_scan_skip_row_store_projection.js b/jstests/core/columnstore/column_scan_skip_row_store_projection.js
index 29d1268d571..8cfee05c075 100644
--- a/jstests/core/columnstore/column_scan_skip_row_store_projection.js
+++ b/jstests/core/columnstore/column_scan_skip_row_store_projection.js
@@ -3,9 +3,8 @@
* above a columnscan stage.
*
* @tags: [
- * # Column store indexes are still under a feature flag and require full SBE.
+ * # Column store indexes are still under a feature flag.
* featureFlagColumnstoreIndexes,
- * featureFlagSbeFull,
* # explain is not supported in transactions
* does_not_support_transactions,
* requires_pipeline_optimization,
diff --git a/jstests/core/columnstore/column_store_index_compression.js b/jstests/core/columnstore/column_store_index_compression.js
index 0e0b4358d40..f59a78d5696 100644
--- a/jstests/core/columnstore/column_store_index_compression.js
+++ b/jstests/core/columnstore/column_store_index_compression.js
@@ -5,9 +5,8 @@
* does_not_support_transactions,
* requires_collstats,
*
- * # Column store indexes are still under a feature flag and require full SBE.
+ * # Column store indexes are still under a feature flag.
* featureFlagColumnstoreIndexes,
- * featureFlagSbeFull,
*
* # In passthrough suites, this test makes direct connections to mongod instances that compose
* # the passthrough fixture in order to perform additional validation. Tenant migration,
diff --git a/jstests/core/columnstore/column_store_projection.js b/jstests/core/columnstore/column_store_projection.js
index c7cb1a0b2a7..65a3f78388f 100644
--- a/jstests/core/columnstore/column_store_projection.js
+++ b/jstests/core/columnstore/column_store_projection.js
@@ -2,9 +2,8 @@
* Test column stores indexes that use a "columnstoreProjection" or "prefix.$**" notation to limit
* indexed data to a subset of the document namespace.
* @tags: [
- * # Column store indexes are still under a feature flag and require full SBE.
+ * # Column store indexes are still under a feature flag.
* featureFlagColumnstoreIndexes,
- * featureFlagSbeFull,
* # Runs explain on an aggregate command which is only compatible with readConcern local.
* assumes_read_concern_unchanged,
* # Columnstore tests set server parameters to disable columnstore query planning heuristics -
diff --git a/jstests/core/columnstore/columnstore_eligibility.js b/jstests/core/columnstore/columnstore_eligibility.js
index 19ff6a3ea57..0ae6e9b0e01 100644
--- a/jstests/core/columnstore/columnstore_eligibility.js
+++ b/jstests/core/columnstore/columnstore_eligibility.js
@@ -1,9 +1,8 @@
/**
* Tests the eligibility of certain queries to use a columnstore index.
* @tags: [
- * # Column store indexes are still under a feature flag and require full SBE.
+ * # Column store indexes are still under a feature flag.
* featureFlagColumnstoreIndexes,
- * featureFlagSbeFull,
* # Refusing to run a test that issues an aggregation command with explain because it may return
* # incomplete results if interrupted by a stepdown.
* does_not_support_stepdowns,
@@ -13,6 +12,9 @@
* # server parameters are stored in-memory only so are not transferred onto the recipient.
* tenant_migration_incompatible,
* not_allowed_with_security_token,
+ * # Logic for when a COLUMN_SCAN plan is generated changed slightly as part of enabling more
+ * # queries in SBE in the 7.0 release.
+ * requires_fcv_70,
* ]
*/
(function() {
@@ -21,7 +23,6 @@
load("jstests/libs/analyze_plan.js");
load("jstests/libs/columnstore_util.js"); // For setUpServerForColumnStoreIndexTest.
load("jstests/libs/fixture_helpers.js"); // For FixtureHelpers.isMongos.
-load("jstests/libs/sbe_util.js"); // For checkSBEEnabled.
if (!setUpServerForColumnStoreIndexTest(db)) {
return;
@@ -69,33 +70,18 @@ explain = coll.find({$or: [{a: 2}, {b: 2}]}, {_id: 0, a: 1}).explain();
// COLUMN_SCAN is used for top-level $or queries.
assert(planHasStage(db, explain, "COLUMN_SCAN"), explain);
-// COLUMN_SCAN is only used for for certain top-level $or queries when sbeFull is also enabled due
-// to a quirk in the engine selection logic.
-const sbeFull = checkSBEEnabled(db, ["featureFlagSbeFull"]);
explain = coll.explain().aggregate([
{$match: {$or: [{a: {$gt: 0}}, {b: {$gt: 0}}]}},
{$project: {_id: 0, computedField: {$add: ["$a", "$b"]}}},
]);
-let planHasColumnScan = planHasStage(db, explain, "COLUMN_SCAN");
-
-if (sbeFull) {
- assert(planHasColumnScan, explain);
-} else {
- assert(!planHasColumnScan, explain);
-}
+assert(planHasStage(db, explain, "COLUMN_SCAN"), explain);
explain = coll.explain().aggregate([
{$match: {$or: [{a: {$gt: 0}}, {b: {$gt: 0}}]}},
{$project: {_id: 0, computedField: {$add: ["$a", "$b"]}}},
{$group: {_id: "$computedField"}}
]);
-planHasColumnScan = planHasStage(db, explain, "COLUMN_SCAN");
-
-if (sbeFull) {
- assert(planHasColumnScan, explain);
-} else {
- assert(!planHasColumnScan, explain);
-}
+assert(planHasStage(db, explain, "COLUMN_SCAN"), explain);
// Simplest case: just scan "a" column.
explain = coll.find({a: {$exists: true}}, {_id: 0, a: 1}).explain();
diff --git a/jstests/core/columnstore/columnstore_index.js b/jstests/core/columnstore/columnstore_index.js
index 8d68700593c..895f93ae93f 100644
--- a/jstests/core/columnstore/columnstore_index.js
+++ b/jstests/core/columnstore/columnstore_index.js
@@ -1,9 +1,8 @@
/**
* Tests some basic use cases and functionality of a columnstore index.
* @tags: [
- * # Column store indexes are still under a feature flag and require full SBE.
+ * # Column store indexes are still under a feature flag.
* featureFlagColumnstoreIndexes,
- * featureFlagSbeFull,
*
* # Uses $indexStats which is not supported inside a transaction.
* does_not_support_transactions,
diff --git a/jstests/core/columnstore/columnstore_index_correctness.js b/jstests/core/columnstore/columnstore_index_correctness.js
index 66398ea26f5..f6fc1621fb3 100644
--- a/jstests/core/columnstore/columnstore_index_correctness.js
+++ b/jstests/core/columnstore/columnstore_index_correctness.js
@@ -1,9 +1,8 @@
/**
* Testing of just the query layer's integration for columnar index.
* @tags: [
- * # Column store indexes are still under a feature flag and require full SBE.
+ * # Column store indexes are still under a feature flag.
* featureFlagColumnstoreIndexes,
- * featureFlagSbeFull,
* # Runs explain on an aggregate command which is only compatible with readConcern local.
* assumes_read_concern_unchanged,
* # Columnstore tests set server parameters to disable columnstore query planning heuristics -
diff --git a/jstests/core/columnstore/columnstore_index_per_path_filters.js b/jstests/core/columnstore/columnstore_index_per_path_filters.js
index c01556b797e..32b457c6b6a 100644
--- a/jstests/core/columnstore/columnstore_index_per_path_filters.js
+++ b/jstests/core/columnstore/columnstore_index_per_path_filters.js
@@ -3,9 +3,8 @@
* might be pushed down into the column scan stage.
*
* @tags: [
- * # Column store indexes are still under a feature flag and require full SBE.
+ * # Column store indexes are still under a feature flag.
* featureFlagColumnstoreIndexes,
- * featureFlagSbeFull,
* # Runs explain on an aggregate command which is only compatible with readConcern local.
* assumes_read_concern_unchanged,
* # Columnstore tests set server parameters to disable columnstore query planning heuristics -
diff --git a/jstests/core/columnstore/columnstore_large_array_index_correctness.js b/jstests/core/columnstore/columnstore_large_array_index_correctness.js
index 5a0f06984d5..3c15b62e247 100644
--- a/jstests/core/columnstore/columnstore_large_array_index_correctness.js
+++ b/jstests/core/columnstore/columnstore_large_array_index_correctness.js
@@ -1,9 +1,8 @@
/**
* Testing of just the query layer's integration for columnar indexes that encode large arrays.
* @tags: [
- * # Column store indexes are still under a feature flag and require full SBE.
+ * # Column store indexes are still under a feature flag.
* featureFlagColumnstoreIndexes,
- * featureFlagSbeFull,
* # Columnstore tests set server parameters to disable columnstore query planning heuristics -
* # 1) server parameters are stored in-memory only so are not transferred onto the recipient,
* # 2) server parameters may not be set in stepdown passthroughs because it is a command that may
diff --git a/jstests/core/columnstore/columnstore_validindex.js b/jstests/core/columnstore/columnstore_validindex.js
index 7b86e97edda..421ea4a6edc 100644
--- a/jstests/core/columnstore/columnstore_validindex.js
+++ b/jstests/core/columnstore/columnstore_validindex.js
@@ -2,7 +2,6 @@
* Tests parsing and validation of columnstore indexes.
* @tags: [
* featureFlagColumnstoreIndexes,
- * featureFlagSbeFull,
* # Uses index building in background.
* requires_background_index,
* # Columnstore tests set server parameters to disable columnstore query planning heuristics -
diff --git a/jstests/core/query/explode_for_sort_plan_cache.js b/jstests/core/query/explode_for_sort_plan_cache.js
index 65bf1a3707e..53d343b35d8 100644
--- a/jstests/core/query/explode_for_sort_plan_cache.js
+++ b/jstests/core/query/explode_for_sort_plan_cache.js
@@ -29,7 +29,6 @@ load("jstests/libs/analyze_plan.js");
load("jstests/libs/sbe_util.js");
const isSBEEnabled = checkSBEEnabled(db);
-const isSBEFullEnabled = checkSBEEnabled(db, ["featureFlagSbeFull"]);
const coll = db.explode_for_sort_plan_cache;
coll.drop();
@@ -147,9 +146,8 @@ assertExplodeForSortCacheParameterizedCorrectly({
newQuery: {$and: [{$expr: {$eq: ["$a", 2]}}, {b: {$in: [1, 2]}}]},
newQueryCount: 6,
// The plan cache entry is always reused for the classic engine but never reused for the SBE
- // engine. Whether this query uses SBE currently depends on the value of 'featureFlagSbeFull',
- // since $expr is not yet enabled by default in SBE.
- reuseEntry: !isSBEFullEnabled,
+ // engine.
+ reuseEntry: !isSBEEnabled,
});
// Rewriting the $in predicate with $or should reuse the plan cache and gives correct results.
@@ -218,4 +216,4 @@ assertExplodeForSortCacheParameterizedCorrectly({
newQueryCount: 0,
reuseEntry: false,
});
-}()); \ No newline at end of file
+}());
diff --git a/jstests/core/sbe_plan_cache_autoparameterize_collscan.js b/jstests/core/sbe_plan_cache_autoparameterize_collscan.js
index c7b47f077a3..c1aaea782be 100644
--- a/jstests/core/sbe_plan_cache_autoparameterize_collscan.js
+++ b/jstests/core/sbe_plan_cache_autoparameterize_collscan.js
@@ -7,8 +7,8 @@
* assumes_read_preference_unchanged,
* assumes_unsharded_collection,
* does_not_support_stepdowns,
- * # The SBE plan cache was enabled by default in 6.3, some of the $in tests behave differently
- * # in 7.0.
+ * # Auto-parameterization behavior observed by this test changed in 7.0 as a result of enabling
+ * # additional scenarios in SBE.
* requires_fcv_70,
* # Plan cache state is node-local and will not get migrated alongside tenant data.
* tenant_migration_incompatible,
@@ -306,35 +306,31 @@ runTest({query: {a: {$exists: true}}, projection: {_id: 1}},
false);
// Test that comparisons expressed as $expr are not auto-parameterized.
-if (checkSBEEnabled(db, ["featureFlagSbeFull"])) {
- runTest({query: {$expr: {$eq: ["$a", 3]}}, projection: {_id: 1}},
- [{_id: 2}],
- {query: {$expr: {$eq: ["$a", 4]}}, projection: {_id: 1}},
- [{_id: 3}, {_id: 4}],
- false);
- runTest({query: {$expr: {$lt: ["$a", 3]}, a: {$type: "number"}}, projection: {_id: 1}},
- [{_id: 0}, {_id: 1}],
- {query: {$expr: {$lt: ["$a", 4]}, a: {$type: "number"}}, projection: {_id: 1}},
- [{_id: 0}, {_id: 1}, {_id: 2}],
- false);
- runTest({query: {$expr: {$lte: ["$a", 3]}, a: {$type: "number"}}, projection: {_id: 1}},
- [{_id: 0}, {_id: 1}, {_id: 2}],
- {query: {$expr: {$lte: ["$a", 4]}, a: {$type: "number"}}, projection: {_id: 1}},
- [{_id: 0}, {_id: 1}, {_id: 2}, {_id: 3}, {_id: 4}],
- false);
- runTest({query: {$expr: {$gt: ["$a", 2]}, a: {$type: "number"}}, projection: {_id: 1}},
- [{_id: 2}, {_id: 3}, {_id: 4}, {_id: 5}, {_id: 6}],
- {query: {$expr: {$gt: ["$a", 3]}, a: {$type: "number"}}, projection: {_id: 1}},
- [{_id: 3}, {_id: 4}, {_id: 5}, {_id: 6}],
- false);
- runTest({query: {$expr: {$gte: ["$a", 2]}, a: {$type: "number"}}, projection: {_id: 1}},
- [{_id: 1}, {_id: 2}, {_id: 3}, {_id: 4}, {_id: 5}, {_id: 6}],
- {query: {$expr: {$gte: ["$a", 3]}, a: {$type: "number"}}, projection: {_id: 1}},
- [{_id: 2}, {_id: 3}, {_id: 4}, {_id: 5}, {_id: 6}],
- false);
-} else {
- jsTestLog("Skipping $expr test cases because SBE is not fully enabled");
-}
+runTest({query: {$expr: {$eq: ["$a", 3]}}, projection: {_id: 1}},
+ [{_id: 2}],
+ {query: {$expr: {$eq: ["$a", 4]}}, projection: {_id: 1}},
+ [{_id: 3}, {_id: 4}],
+ false);
+runTest({query: {$expr: {$lt: ["$a", 3]}, a: {$type: "number"}}, projection: {_id: 1}},
+ [{_id: 0}, {_id: 1}],
+ {query: {$expr: {$lt: ["$a", 4]}, a: {$type: "number"}}, projection: {_id: 1}},
+ [{_id: 0}, {_id: 1}, {_id: 2}],
+ false);
+runTest({query: {$expr: {$lte: ["$a", 3]}, a: {$type: "number"}}, projection: {_id: 1}},
+ [{_id: 0}, {_id: 1}, {_id: 2}],
+ {query: {$expr: {$lte: ["$a", 4]}, a: {$type: "number"}}, projection: {_id: 1}},
+ [{_id: 0}, {_id: 1}, {_id: 2}, {_id: 3}, {_id: 4}],
+ false);
+runTest({query: {$expr: {$gt: ["$a", 2]}, a: {$type: "number"}}, projection: {_id: 1}},
+ [{_id: 2}, {_id: 3}, {_id: 4}, {_id: 5}, {_id: 6}],
+ {query: {$expr: {$gt: ["$a", 3]}, a: {$type: "number"}}, projection: {_id: 1}},
+ [{_id: 3}, {_id: 4}, {_id: 5}, {_id: 6}],
+ false);
+runTest({query: {$expr: {$gte: ["$a", 2]}, a: {$type: "number"}}, projection: {_id: 1}},
+ [{_id: 1}, {_id: 2}, {_id: 3}, {_id: 4}, {_id: 5}, {_id: 6}],
+ {query: {$expr: {$gte: ["$a", 3]}, a: {$type: "number"}}, projection: {_id: 1}},
+ [{_id: 2}, {_id: 3}, {_id: 4}, {_id: 5}, {_id: 6}],
+ false);
// Test that the same length of $in list generates the same plan cache key.
runTest({query: {a: {$in: [1, 2]}}, projection: {_id: 1}},