diff options
author | Randolph Tan <randolph@10gen.com> | 2018-09-06 15:56:56 -0400 |
---|---|---|
committer | Randolph Tan <randolph@10gen.com> | 2018-09-21 11:48:16 -0400 |
commit | 31fb995848293b1a47506bef7ca2f1fe090662b5 (patch) | |
tree | f8605fd5c0a94f04f436f02288e2b308b876f598 /src/mongo/s/write_ops | |
parent | 73e7f1883f492dbefe25badd1ebdfed34859d844 (diff) | |
download | mongo-31fb995848293b1a47506bef7ca2f1fe090662b5.tar.gz |
SERVER-37016 Don't stash TransactionRouter inside ShardingTaskExecutor
Diffstat (limited to 'src/mongo/s/write_ops')
-rw-r--r-- | src/mongo/s/write_ops/SConscript | 2 | ||||
-rw-r--r-- | src/mongo/s/write_ops/batch_write_exec.cpp | 17 |
2 files changed, 10 insertions, 9 deletions
diff --git a/src/mongo/s/write_ops/SConscript b/src/mongo/s/write_ops/SConscript index 6aa140a7722..8f1faef11fe 100644 --- a/src/mongo/s/write_ops/SConscript +++ b/src/mongo/s/write_ops/SConscript @@ -32,7 +32,7 @@ env.Library( 'write_op.cpp', ], LIBDEPS=[ - '$BUILD_DIR/mongo/s/async_requests_sender', + '$BUILD_DIR/mongo/s/multi_statement_transaction_requests_sender', '$BUILD_DIR/mongo/s/commands/cluster_commands_helpers', '$BUILD_DIR/mongo/s/transaction/router_session', 'batch_write_types', diff --git a/src/mongo/s/write_ops/batch_write_exec.cpp b/src/mongo/s/write_ops/batch_write_exec.cpp index 844730e1c40..9c88ce9d8ea 100644 --- a/src/mongo/s/write_ops/batch_write_exec.cpp +++ b/src/mongo/s/write_ops/batch_write_exec.cpp @@ -39,9 +39,9 @@ #include "mongo/client/connection_string.h" #include "mongo/client/remote_command_targeter.h" #include "mongo/executor/task_executor_pool.h" -#include "mongo/s/async_requests_sender.h" #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" +#include "mongo/s/multi_statement_transaction_requests_sender.h" #include "mongo/s/transaction/transaction_router.h" #include "mongo/s/write_ops/batch_write_op.h" #include "mongo/s/write_ops/write_error_detail.h" @@ -207,13 +207,14 @@ void BatchWriteExec::executeBatch(OperationContext* opCtx, pendingBatches.emplace(targetShardId, nextBatch); } - AsyncRequestsSender ars(opCtx, - Grid::get(opCtx)->getExecutorPool()->getArbitraryExecutor(), - clientRequest.getNS().db().toString(), - requests, - kPrimaryOnlyReadPreference, - opCtx->getTxnNumber() ? Shard::RetryPolicy::kIdempotent - : Shard::RetryPolicy::kNoRetry); + MultiStatementTransactionRequestsSender ars( + opCtx, + Grid::get(opCtx)->getExecutorPool()->getArbitraryExecutor(), + clientRequest.getNS().db().toString(), + requests, + kPrimaryOnlyReadPreference, + opCtx->getTxnNumber() ? Shard::RetryPolicy::kIdempotent + : Shard::RetryPolicy::kNoRetry); numSent += pendingBatches.size(); // |