diff options
author | Jack Mulrow <jack.mulrow@mongodb.com> | 2023-04-24 20:32:29 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-05-04 16:35:50 +0000 |
commit | 2fafe2adeffb424d16bf14ef4686caf645adfba5 (patch) | |
tree | 9cec7377b1a37290850dd9a67de1d19923a2f809 /src/mongo/s/commands/cluster_find_and_modify_cmd.cpp | |
parent | 6adceba617ddf90c2d739ccf7b383f4a3b5f189b (diff) | |
download | mongo-2fafe2adeffb424d16bf14ef4686caf645adfba5.tar.gz |
SERVER-75676 Run transaction API cleanup tasks on out of line executor
Diffstat (limited to 'src/mongo/s/commands/cluster_find_and_modify_cmd.cpp')
-rw-r--r-- | src/mongo/s/commands/cluster_find_and_modify_cmd.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mongo/s/commands/cluster_find_and_modify_cmd.cpp b/src/mongo/s/commands/cluster_find_and_modify_cmd.cpp index d8b3c820341..7dfec971f08 100644 --- a/src/mongo/s/commands/cluster_find_and_modify_cmd.cpp +++ b/src/mongo/s/commands/cluster_find_and_modify_cmd.cpp @@ -157,11 +157,10 @@ void handleWouldChangeOwningShardErrorNonTransaction( const write_ops::FindAndModifyCommandRequest& request, BSONObjBuilder* result) { auto inlineExecutor = std::make_shared<executor::InlineExecutor>(); - auto sleepInlineExecutor = inlineExecutor->getSleepableExecutor( - Grid::get(opCtx)->getExecutorPool()->getFixedExecutor()); + auto& executor = Grid::get(opCtx)->getExecutorPool()->getFixedExecutor(); auto txn = txn_api::SyncTransactionWithRetries( - opCtx, sleepInlineExecutor, nullptr /* resourceYielder */, inlineExecutor); + opCtx, executor, nullptr /* resourceYielder */, inlineExecutor); // Shared state for the transaction API use below. struct SharedBlock { @@ -258,11 +257,10 @@ void handleWouldChangeOwningShardErrorTransaction( try { auto& executor = Grid::get(opCtx)->getExecutorPool()->getFixedExecutor(); auto inlineExecutor = std::make_shared<executor::InlineExecutor>(); - auto sleepInlineExecutor = inlineExecutor->getSleepableExecutor(executor); auto txn = txn_api::SyncTransactionWithRetries( opCtx, - sleepInlineExecutor, + executor, TransactionRouterResourceYielder::makeForLocalHandoff(), inlineExecutor); |