diff --git a/src/mongo/db/query/query_feature_flags.idl b/src/mongo/db/query/query_feature_flags.idl index 4ad720b5da..45202304db 100644 --- a/src/mongo/db/query/query_feature_flags.idl +++ b/src/mongo/db/query/query_feature_flags.idl @@ -39,7 +39,8 @@ feature_flags: description: >- When set to true, SBE engine is used instead of the classic engine. cpp_varname: gSBE - default: false + version: 4.9 + default: true featureFlagChangeStreamsOptimization: description: "Feature flag for enabling change streams optimization" diff --git a/src/mongo/db/query/sbe_stage_builder.cpp b/src/mongo/db/query/sbe_stage_builder.cpp index 1634bda401..35aca879c0 100644 --- a/src/mongo/db/query/sbe_stage_builder.cpp +++ b/src/mongo/db/query/sbe_stage_builder.cpp @@ -1845,6 +1845,11 @@ std::pair, PlanStageSlots> SlotBasedStageBuilder {STAGE_SORT_MERGE, &SlotBasedStageBuilder::buildSortMerge}, {STAGE_SHARDING_FILTER, &SlotBasedStageBuilder::buildShardFilter}}; + auto supported = kStageBuilders.find(root->getType()) != kStageBuilders.end(); + if (!supported) { + std::cout << "Node " << root->toString() << std::endl; + invariant(false); + } tassert(4822884, str::stream() << "Unsupported QSN in SBE stage builder: " << root->toString(), kStageBuilders.find(root->getType()) != kStageBuilders.end());