summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJames Wahlin <james@mongodb.com>2019-03-22 13:42:12 -0400
committerJames Wahlin <james@mongodb.com>2019-03-22 16:24:08 -0400
commit7863f89c67dc4fa50330e585b5a4310daa0f42dc (patch)
treec9a916aa406670621812b2e16e897f7fef1ec56c /src
parentadd02fb371a56a7802c31b643df5fd0c716f04c1 (diff)
downloadmongo-7863f89c67dc4fa50330e585b5a4310daa0f42dc.tar.gz
SERVER-40295 Add details to stage_builder.cpp invariant message
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/query/stage_builder.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/db/query/stage_builder.cpp b/src/mongo/db/query/stage_builder.cpp
index 4612e58abfc..24b74ad206d 100644
--- a/src/mongo/db/query/stage_builder.cpp
+++ b/src/mongo/db/query/stage_builder.cpp
@@ -93,7 +93,11 @@ PlanStage* buildStages(OperationContext* opCtx,
auto descriptor = collection->getIndexCatalog()->findIndexByName(
opCtx, ixn->index.identifier.catalogName);
- invariant(descriptor);
+ invariant(descriptor,
+ str::stream() << "Namespace: " << collection->ns() << ", CanonicalQuery: "
+ << cq.toStringShort()
+ << ", IndexEntry: "
+ << ixn->index.toString());
// We use the node's internal name, keyPattern and multikey details here. For $**
// indexes, these may differ from the information recorded in the index's descriptor.