diff options
author | Benety Goh <benety@mongodb.com> | 2022-04-06 06:11:55 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-04-06 12:08:39 +0000 |
commit | 729774b7c096ef0a3a6158c5394245937b883667 (patch) | |
tree | 948a43b0c13f54616f39fd8d24ccc55a72260478 /src/mongo/db/catalog_raii.cpp | |
parent | fc999fe67861f0c40f432bade6091f70de84f8f1 (diff) | |
download | mongo-729774b7c096ef0a3a6158c5394245937b883667.tar.gz |
SERVER-65137 LookupCollectionForYieldRestore saves collection namespace at construction
Diffstat (limited to 'src/mongo/db/catalog_raii.cpp')
-rw-r--r-- | src/mongo/db/catalog_raii.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/db/catalog_raii.cpp b/src/mongo/db/catalog_raii.cpp index d4040b1c03e..b861af2f10b 100644 --- a/src/mongo/db/catalog_raii.cpp +++ b/src/mongo/db/catalog_raii.cpp @@ -331,11 +331,14 @@ Collection* AutoGetCollection::getWritableCollection(OperationContext* opCtx) { // new write unit of work is opened. opCtx->recoveryUnit()->registerChange( [this, opCtx](boost::optional<Timestamp> commitTime) { - _coll = CollectionPtr(opCtx, _coll.get(), LookupCollectionForYieldRestore()); + _coll = + CollectionPtr(opCtx, _coll.get(), LookupCollectionForYieldRestore(_coll->ns())); _writableColl = nullptr; }, [this, originalCollection = _coll.get(), opCtx]() { - _coll = CollectionPtr(opCtx, originalCollection, LookupCollectionForYieldRestore()); + _coll = CollectionPtr(opCtx, + originalCollection, + LookupCollectionForYieldRestore(originalCollection->ns())); _writableColl = nullptr; }); |