summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYoonsoo Kim <yoonsoo.kim@mongodb.com>2022-04-08 22:56:11 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-04-08 23:30:25 +0000
commit86efc4be5f8921af9e8b89ef4219b089ef0c67cd (patch)
tree6af922acf8f1d86c21a903df88784e9ecb08145c /src
parent72f118efc3078b75be837b6abbb95603995a605a (diff)
downloadmongo-86efc4be5f8921af9e8b89ef4219b089ef0c67cd.tar.gz
SERVER-65341 Enable the SBE lookup feature by default
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/commands/run_aggregate.cpp4
-rw-r--r--src/mongo/db/pipeline/pipeline_d.cpp4
-rw-r--r--src/mongo/db/pipeline/process_interface/common_mongod_process_interface.cpp4
-rw-r--r--src/mongo/db/query/query_feature_flags.idl3
4 files changed, 11 insertions, 4 deletions
diff --git a/src/mongo/db/commands/run_aggregate.cpp b/src/mongo/db/commands/run_aggregate.cpp
index ccf2ef01760..71356f55cda 100644
--- a/src/mongo/db/commands/run_aggregate.cpp
+++ b/src/mongo/db/commands/run_aggregate.cpp
@@ -673,7 +673,9 @@ Status runAggregate(OperationContext* opCtx,
std::vector<NamespaceStringOrUUID> secondaryExecNssList;
// Taking locks over multiple collections is not supported outside of $lookup pushdown.
- if (feature_flags::gFeatureFlagSBELookupPushdown.isEnabledAndIgnoreFCV() &&
+ if (serverGlobalParams.featureCompatibility.isVersionInitialized() &&
+ feature_flags::gFeatureFlagSBELookupPushdown.isEnabled(
+ serverGlobalParams.featureCompatibility) &&
!internalQuerySlotBasedExecutionDisableLookupPushdown.load()) {
secondaryExecNssList = liteParsedPipeline.getForeignExecutionNamespaces();
}
diff --git a/src/mongo/db/pipeline/pipeline_d.cpp b/src/mongo/db/pipeline/pipeline_d.cpp
index 63dfcc1a7e4..03e1d0f77f5 100644
--- a/src/mongo/db/pipeline/pipeline_d.cpp
+++ b/src/mongo/db/pipeline/pipeline_d.cpp
@@ -157,7 +157,9 @@ std::vector<std::unique_ptr<InnerPipelineStageInterface>> extractSbeCompatibleSt
// sharded and which ones aren't. As such, if any secondary collection is a view or is sharded,
// no $lookup will be eligible for pushdown.
const bool disallowLookupPushdown =
- !feature_flags::gFeatureFlagSBELookupPushdown.isEnabledAndIgnoreFCV() ||
+ !(serverGlobalParams.featureCompatibility.isVersionInitialized() &&
+ feature_flags::gFeatureFlagSBELookupPushdown.isEnabled(
+ serverGlobalParams.featureCompatibility)) ||
internalQuerySlotBasedExecutionDisableLookupPushdown.load() || isMainCollectionSharded ||
collections.isAnySecondaryNamespaceAViewOrSharded();
diff --git a/src/mongo/db/pipeline/process_interface/common_mongod_process_interface.cpp b/src/mongo/db/pipeline/process_interface/common_mongod_process_interface.cpp
index 80334058987..2dd640821e0 100644
--- a/src/mongo/db/pipeline/process_interface/common_mongod_process_interface.cpp
+++ b/src/mongo/db/pipeline/process_interface/common_mongod_process_interface.cpp
@@ -434,7 +434,9 @@ CommonMongodProcessInterface::attachCursorSourceToPipelineForLocalRead(Pipeline*
// Reparse 'pipeline' to discover whether there are secondary namespaces that we need to lock
// when constructing our query executor.
std::vector<NamespaceStringOrUUID> secondaryNamespaces = [&]() {
- if (feature_flags::gFeatureFlagSBELookupPushdown.isEnabledAndIgnoreFCV() &&
+ if (serverGlobalParams.featureCompatibility.isVersionInitialized() &&
+ feature_flags::gFeatureFlagSBELookupPushdown.isEnabled(
+ serverGlobalParams.featureCompatibility) &&
!internalQuerySlotBasedExecutionDisableLookupPushdown.load()) {
auto lpp = LiteParsedPipeline(expCtx->ns, pipeline->serializeToBson());
return lpp.getForeignExecutionNamespaces();
diff --git a/src/mongo/db/query/query_feature_flags.idl b/src/mongo/db/query/query_feature_flags.idl
index 8e2632c893a..084d606ff14 100644
--- a/src/mongo/db/query/query_feature_flags.idl
+++ b/src/mongo/db/query/query_feature_flags.idl
@@ -132,7 +132,8 @@ feature_flags:
featureFlagSBELookupPushdown:
description: "Feature flag for allowing SBE $lookup pushdown"
cpp_varname: gFeatureFlagSBELookupPushdown
- default: false
+ default: true
+ version: 6.0
featureFlagSearchShardedFacets:
description: "Enable use of $$SEARCH_META on sharded collections"