summaryrefslogtreecommitdiff
path: root/src/mongo/s/transaction_router.cpp
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2021-09-03 19:11:40 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-09-08 07:54:48 +0000
commitc90f38192378c8526354465991830524eda90c1f (patch)
tree73ce6a76f4dc6f8eaa206309becf5881aaf20a32 /src/mongo/s/transaction_router.cpp
parenta0a0d7eecccf38f028a77c4cc8b0f13f8673f675 (diff)
downloadmongo-c90f38192378c8526354465991830524eda90c1f.tar.gz
SERVER-59782 migrate makeGuard calls to ScopeGuard
Diffstat (limited to 'src/mongo/s/transaction_router.cpp')
-rw-r--r--src/mongo/s/transaction_router.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/s/transaction_router.cpp b/src/mongo/s/transaction_router.cpp
index 64742e972c7..32bdb81b368 100644
--- a/src/mongo/s/transaction_router.cpp
+++ b/src/mongo/s/transaction_router.cpp
@@ -1221,7 +1221,7 @@ BSONObj TransactionRouter::Router::abortTransaction(OperationContext* opCtx) {
// Update stats on scope exit so the transaction is considered "active" while waiting on abort
// responses.
- auto updateStatsGuard = makeGuard([&] { _onExplicitAbort(opCtx); });
+ ScopeGuard updateStatsGuard([&] { _onExplicitAbort(opCtx); });
// The router has yet to send any commands to a remote shard for this transaction.
// Return the same error that would have been returned by a shard.
@@ -1297,7 +1297,7 @@ void TransactionRouter::Router::implicitlyAbortTransaction(OperationContext* opC
// Update stats on scope exit so the transaction is considered "active" while waiting on abort
// responses.
- auto updateStatsGuard = makeGuard([&] { _onImplicitAbort(opCtx, status); });
+ ScopeGuard updateStatsGuard([&] { _onImplicitAbort(opCtx, status); });
if (o().participants.empty()) {
return;