summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Storch <david.storch@mongodb.com>2021-03-05 12:18:02 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-03-05 21:40:22 +0000
commita6b5cdc3fa1722ea241a3d1ff9575a82e4a46081 (patch)
treeafb988ed96f0c4b917b866aafe780ce7f91d44e3
parent8fc03988ff0cdf087b9108aff3a649e59f45cddb (diff)
downloadmongo-a6b5cdc3fa1722ea241a3d1ff9575a82e4a46081.tar.gz
SERVER-54832 make SBE stage builder tassert() that index exists in catalog
-rw-r--r--src/mongo/db/query/sbe_stage_builder_index_scan.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/query/sbe_stage_builder_index_scan.cpp b/src/mongo/db/query/sbe_stage_builder_index_scan.cpp
index 0ee2521b83b..863a2824ed8 100644
--- a/src/mongo/db/query/sbe_stage_builder_index_scan.cpp
+++ b/src/mongo/db/query/sbe_stage_builder_index_scan.cpp
@@ -687,6 +687,10 @@ std::pair<std::unique_ptr<sbe::PlanStage>, PlanStageSlots> generateIndexScan(
auto descriptor =
collection->getIndexCatalog()->findIndexByName(opCtx, ixn->index.identifier.catalogName);
+ tassert(5483200,
+ str::stream() << "failed to find index in catalog named: "
+ << ixn->index.identifier.catalogName,
+ descriptor);
auto accessMethod = collection->getIndexCatalog()->getEntry(descriptor)->accessMethod();
auto intervals =
makeIntervalsFromIndexBounds(ixn->bounds,