summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mongo/db/repl/tenant_migration_recipient_op_observer.cpp12
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);
+ });
}
}
}