diff options
author | James Wahlin <james@mongodb.com> | 2019-03-22 13:42:12 -0400 |
---|---|---|
committer | James Wahlin <james@mongodb.com> | 2019-03-22 16:24:08 -0400 |
commit | 7863f89c67dc4fa50330e585b5a4310daa0f42dc (patch) | |
tree | c9a916aa406670621812b2e16e897f7fef1ec56c /src | |
parent | add02fb371a56a7802c31b643df5fd0c716f04c1 (diff) | |
download | mongo-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.cpp | 6 |
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. |