diff options
author | David Storch <david.storch@10gen.com> | 2018-12-07 17:12:07 -0500 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2018-12-10 10:52:38 -0500 |
commit | 35efc48897270a83097008f9343ae8c56a9e77cc (patch) | |
tree | 406883d218e510433424f8d3bff29e0ab28d97f3 /src/mongo/db/exec/requires_collection_stage.cpp | |
parent | 7b1e64f12e855d979232ef7b185002d5c8103353 (diff) | |
download | mongo-35efc48897270a83097008f9343ae8c56a9e77cc.tar.gz |
SERVER-37449 Add RequiresAllIndicesStage and use for subplanning and multiplanning.
These stages hold the collection's list of indices during
plan selection, and expect all indices in this list to
remain valid until plan selection completes.
Diffstat (limited to 'src/mongo/db/exec/requires_collection_stage.cpp')
-rw-r--r-- | src/mongo/db/exec/requires_collection_stage.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mongo/db/exec/requires_collection_stage.cpp b/src/mongo/db/exec/requires_collection_stage.cpp index 5825485dea6..c4794c3bfd2 100644 --- a/src/mongo/db/exec/requires_collection_stage.cpp +++ b/src/mongo/db/exec/requires_collection_stage.cpp @@ -50,9 +50,18 @@ void RequiresCollectionStageBase<CollectionT>::doRestoreState() { const UUIDCatalog& catalog = UUIDCatalog::get(getOpCtx()); _collection = catalog.lookupCollectionByUUID(_collectionUUID); uassert(ErrorCodes::QueryPlanKilled, - str::stream() << "UUID " << _collectionUUID << " no longer exists.", + str::stream() << "Collection dropped. UUID " << _collectionUUID << " no longer exists.", _collection); + // TODO SERVER-31695: Allow queries to survive collection rename, rather than throwing here when + // a rename has happened during yield. + uassert(ErrorCodes::QueryPlanKilled, + str::stream() << "Collection with UUID " << _collectionUUID << " was renamed from '" + << _nss.ns() + << "' to '" + << _collection->ns().ns(), + _nss == _collection->ns()); + doRestoreStateRequiresCollection(); } |