summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/cqf_get_executor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/query/cqf_get_executor.cpp')
-rw-r--r--src/mongo/db/query/cqf_get_executor.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/query/cqf_get_executor.cpp b/src/mongo/db/query/cqf_get_executor.cpp
index 3508553b591..cc1c42bc3af 100644
--- a/src/mongo/db/query/cqf_get_executor.cpp
+++ b/src/mongo/db/query/cqf_get_executor.cpp
@@ -56,9 +56,12 @@
#include "mongo/db/query/yield_policy_callbacks_impl.h"
#include "mongo/logv2/log.h"
#include "mongo/logv2/log_attr.h"
+#include "mongo/util/fail_point.h"
#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery
+MONGO_FAIL_POINT_DEFINE(failConstructingBonsaiExecutor);
+
namespace mongo {
using namespace optimizer;
using cost_model::CostEstimator;
@@ -638,6 +641,9 @@ std::unique_ptr<PlanExecutor, PlanExecutor::Deleter> getSBEExecutorViaCascadesOp
const boost::optional<BSONObj>& indexHint,
std::unique_ptr<Pipeline, PipelineDeleter> pipeline,
std::unique_ptr<CanonicalQuery> canonicalQuery) {
+ if (MONGO_unlikely(failConstructingBonsaiExecutor.shouldFail())) {
+ uasserted(620340, "attempting to use CQF while it is disabled");
+ }
// Ensure that either pipeline or canonicalQuery is set.
tassert(624070,
"getSBEExecutorViaCascadesOptimizer expects exactly one of the following to be set: "