diff options
author | Billy Donahue <billy.donahue@mongodb.com> | 2021-09-03 19:11:40 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-09-08 07:54:48 +0000 |
commit | c90f38192378c8526354465991830524eda90c1f (patch) | |
tree | 73ce6a76f4dc6f8eaa206309becf5881aaf20a32 /src/mongo/db/catalog/multi_index_block.cpp | |
parent | a0a0d7eecccf38f028a77c4cc8b0f13f8673f675 (diff) | |
download | mongo-c90f38192378c8526354465991830524eda90c1f.tar.gz |
SERVER-59782 migrate makeGuard calls to ScopeGuard
Diffstat (limited to 'src/mongo/db/catalog/multi_index_block.cpp')
-rw-r--r-- | src/mongo/db/catalog/multi_index_block.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/catalog/multi_index_block.cpp b/src/mongo/db/catalog/multi_index_block.cpp index 5b99bf84e1e..137793a4c42 100644 --- a/src/mongo/db/catalog/multi_index_block.cpp +++ b/src/mongo/db/catalog/multi_index_block.cpp @@ -365,7 +365,7 @@ Status MultiIndexBlock::insertAllDocumentsInCollection( // Refrain from persisting any multikey updates as a result from building the index. Instead, // accumulate them in the `MultikeyPathTracker` and do the write as part of the update that // commits the index. - auto stopTracker = makeGuard( + ScopeGuard stopTracker( [this, opCtx] { MultikeyPathTracker::get(opCtx).stopTrackingMultikeyPathInfo(); }); if (MultikeyPathTracker::get(opCtx).isTrackingMultikeyPathInfo()) { stopTracker.dismiss(); @@ -846,7 +846,7 @@ Status MultiIndexBlock::commit(OperationContext* opCtx, } // Do not interfere with writing multikey information when committing index builds. - auto restartTracker = makeGuard( + ScopeGuard restartTracker( [this, opCtx] { MultikeyPathTracker::get(opCtx).startTrackingMultikeyPathInfo(); }); if (!MultikeyPathTracker::get(opCtx).isTrackingMultikeyPathInfo()) { restartTracker.dismiss(); |