summaryrefslogtreecommitdiff
path: root/src/mongo/s/async_requests_sender.cpp
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2018-06-19 10:54:00 -0400
committerRandolph Tan <randolph@10gen.com>2018-06-26 09:59:29 -0400
commitcf0b52c7c29fe4917b9e50776fa79a85a952b735 (patch)
tree0c67a4fcaef32ba67b9ab6cd1db6ace6b0eb0902 /src/mongo/s/async_requests_sender.cpp
parent2aa65a86193e5d38934a4f2d6b0a8298e2432485 (diff)
downloadmongo-cf0b52c7c29fe4917b9e50776fa79a85a952b735.tar.gz
SERVER-35735 Single shard transaction support for basic crud ops
Diffstat (limited to 'src/mongo/s/async_requests_sender.cpp')
-rw-r--r--src/mongo/s/async_requests_sender.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/mongo/s/async_requests_sender.cpp b/src/mongo/s/async_requests_sender.cpp
index 61efb9ae468..aef8ac9d3b7 100644
--- a/src/mongo/s/async_requests_sender.cpp
+++ b/src/mongo/s/async_requests_sender.cpp
@@ -38,7 +38,6 @@
#include "mongo/rpc/get_status_from_command_result.h"
#include "mongo/s/client/shard_registry.h"
#include "mongo/s/grid.h"
-#include "mongo/s/transaction/router_session_runtime_state.h"
#include "mongo/stdx/memory.h"
#include "mongo/transport/baton.h"
#include "mongo/transport/transport_layer.h"
@@ -69,15 +68,8 @@ AsyncRequestsSender::AsyncRequestsSender(OperationContext* opCtx,
_db(dbName.toString()),
_readPreference(readPreference),
_retryPolicy(retryPolicy) {
- auto routerSession = RouterSessionRuntimeState::get(opCtx);
-
for (const auto& request : requests) {
auto cmdObj = request.cmdObj;
- if (routerSession) {
- auto& participant = routerSession->getOrCreateParticipant(request.shardId);
- cmdObj = participant.attachTxnFieldsIfNeeded(request.cmdObj);
- }
-
_remotes.emplace_back(request.shardId, cmdObj);
}
@@ -301,11 +293,6 @@ void AsyncRequestsSender::_makeProgress(OperationContext* opCtx) {
// Store the response or error.
if (job->cbData.response.status.isOK()) {
remote.swResponse = std::move(job->cbData.response);
-
- if (auto routerSession = RouterSessionRuntimeState::get(opCtx)) {
- auto& participant = routerSession->getOrCreateParticipant(remote.shardId);
- participant.markAsCommandSent();
- }
} else {
// TODO: call participant.markAsCommandSent on "transaction already started" errors?
remote.swResponse = std::move(job->cbData.response.status);