diff options
Diffstat (limited to 'src/mongo/db/repl/tenant_migration_donor_service.cpp')
-rw-r--r-- | src/mongo/db/repl/tenant_migration_donor_service.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mongo/db/repl/tenant_migration_donor_service.cpp b/src/mongo/db/repl/tenant_migration_donor_service.cpp index 1d3f4cdf1e2..d9c512059ff 100644 --- a/src/mongo/db/repl/tenant_migration_donor_service.cpp +++ b/src/mongo/db/repl/tenant_migration_donor_service.cpp @@ -515,7 +515,12 @@ ExecutorFuture<repl::OpTime> TenantMigrationDonorService::Instance::_insertState return repl::ReplClientInfo::forClient(opCtx->getClient()).getLastOp(); }) - .until([](StatusWith<repl::OpTime> swOpTime) { return swOpTime.getStatus().isOK(); }) + .until([&](StatusWith<repl::OpTime> swOpTime) { + if (swOpTime.getStatus().code() == ErrorCodes::ConflictingServerlessOperation) { + uassertStatusOK(swOpTime); + } + return swOpTime.getStatus().isOK(); + }) .withBackoffBetweenIterations(kExponentialBackoff) .on(**executor, token); } |