summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPierlauro Sciarelli <pierlauro.sciarelli@mongodb.com>2021-05-21 13:13:46 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-05-25 11:16:05 +0000
commit284ecabb7ec2d82cfc0f4b31090df4cfeb4c99b6 (patch)
treed3803ec27ce2447763fa890d2008c8889f6d43a0 /src
parenta488cf175a1cf85a05c1d50c1ccbbbc09bfdb00e (diff)
downloadmongo-284ecabb7ec2d82cfc0f4b31090df4cfeb4c99b6.tar.gz
SERVER-55573 Deadlock between stepdown and chunk migration
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/s/migration_destination_manager.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/db/s/migration_destination_manager.cpp b/src/mongo/db/s/migration_destination_manager.cpp
index 33b1d94590b..9b3f7de075f 100644
--- a/src/mongo/db/s/migration_destination_manager.cpp
+++ b/src/mongo/db/s/migration_destination_manager.cpp
@@ -37,6 +37,7 @@
#include <vector>
#include "mongo/db/auth/authorization_session.h"
+#include "mongo/db/cancelable_operation_context.h"
#include "mongo/db/catalog/document_validation.h"
#include "mongo/db/concurrency/write_conflict_exception.h"
#include "mongo/db/db_raii.h"
@@ -1037,7 +1038,10 @@ void MigrationDestinationManager::_migrateDriver(OperationContext* outerOpCtx) {
}
AlternativeClientRegion acr(newClient);
- auto newOpCtxPtr = cc().makeOperationContext();
+ auto executor =
+ Grid::get(outerOpCtx->getServiceContext())->getExecutorPool()->getFixedExecutor();
+ auto newOpCtxPtr = CancelableOperationContext(
+ cc().makeOperationContext(), outerOpCtx->getCancellationToken(), executor);
auto opCtx = newOpCtxPtr.get();
{