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/query/store_possible_cursor.cpp | |
parent | 73e7f1883f492dbefe25badd1ebdfed34859d844 (diff) | |
download | mongo-31fb995848293b1a47506bef7ca2f1fe090662b5.tar.gz |
SERVER-37016 Don't stash TransactionRouter inside ShardingTaskExecutor
Diffstat (limited to 'src/mongo/s/query/store_possible_cursor.cpp')
-rw-r--r-- | src/mongo/s/query/store_possible_cursor.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/s/query/store_possible_cursor.cpp b/src/mongo/s/query/store_possible_cursor.cpp index 28db3452a29..b50177ba246 100644 --- a/src/mongo/s/query/store_possible_cursor.cpp +++ b/src/mongo/s/query/store_possible_cursor.cpp @@ -41,6 +41,7 @@ #include "mongo/s/query/cluster_client_cursor_params.h" #include "mongo/s/query/cluster_cursor_manager.h" #include "mongo/s/shard_id.h" +#include "mongo/s/transaction/transaction_router.h" namespace mongo { @@ -119,6 +120,10 @@ StatusWith<BSONObj> storePossibleCursor(OperationContext* opCtx, params.lsid = opCtx->getLogicalSessionId(); params.txnNumber = opCtx->getTxnNumber(); + if (TransactionRouter::get(opCtx)) { + params.isAutoCommit = false; + } + auto ccc = ClusterClientCursorImpl::make(opCtx, executor, std::move(params)); // We don't expect to use this cursor until a subsequent getMore, so detach from the current |