diff options
author | Didier Nadeau <didier.nadeau@mongodb.com> | 2023-05-16 12:41:45 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-05-16 13:21:05 +0000 |
commit | f79b80bee2792f829aa1e6a2aef847b27f34ed23 (patch) | |
tree | 6f7805f4e1d748dda5bef3e49cad32e0558fc275 | |
parent | d12e38e18857307e369c23dde1873b54666d6ae3 (diff) | |
download | mongo-f79b80bee2792f829aa1e6a2aef847b27f34ed23.tar.gz |
SERVER-72370 Fix incorrect serverless lock usage in Tenant Migration
-rw-r--r-- | src/mongo/db/repl/tenant_migration_recipient_op_observer.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/db/repl/tenant_migration_recipient_op_observer.cpp b/src/mongo/db/repl/tenant_migration_recipient_op_observer.cpp index 86ca883159a..a0bf050ec34 100644 --- a/src/mongo/db/repl/tenant_migration_recipient_op_observer.cpp +++ b/src/mongo/db/repl/tenant_migration_recipient_op_observer.cpp @@ -127,12 +127,12 @@ void TenantMigrationRecipientOpObserver::onInserts( ServerlessOperationLockRegistry::get(opCtx->getServiceContext()) .acquireLock(ServerlessOperationLockRegistry::LockType::kTenantRecipient, recipientStateDoc.getId()); - opCtx->recoveryUnit()->onRollback( - [migrationId = recipientStateDoc.getId()](OperationContext* opCtx) { - ServerlessOperationLockRegistry::get(opCtx->getServiceContext()) - .releaseLock(ServerlessOperationLockRegistry::LockType::kTenantDonor, - migrationId); - }); + opCtx->recoveryUnit()->onRollback([migrationId = recipientStateDoc.getId()]( + OperationContext* opCtx) { + ServerlessOperationLockRegistry::get(opCtx->getServiceContext()) + .releaseLock(ServerlessOperationLockRegistry::LockType::kTenantRecipient, + migrationId); + }); } } } |