diff options
author | Jack Mulrow <jack.mulrow@mongodb.com> | 2017-09-13 16:02:45 -0400 |
---|---|---|
committer | Jack Mulrow <jack.mulrow@mongodb.com> | 2017-09-14 18:02:14 -0400 |
commit | 8f4b4d65a83777e3ab18bdaa8c17717d3d066b2e (patch) | |
tree | fa795a0928cd46ddc5b982b7e26c63f769860da3 /src/mongo/db/initialize_operation_session_info.h | |
parent | b6557c2f32636e2c65ae4b53f13f46ba56ff9d7a (diff) | |
download | mongo-8f4b4d65a83777e3ab18bdaa8c17717d3d066b2e.tar.gz |
SERVER-30765 Only allow transaction numbers on mongos or replica set members
Diffstat (limited to 'src/mongo/db/initialize_operation_session_info.h')
-rw-r--r-- | src/mongo/db/initialize_operation_session_info.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/db/initialize_operation_session_info.h b/src/mongo/db/initialize_operation_session_info.h index fddc162bfb6..3b1fdc0f8af 100644 --- a/src/mongo/db/initialize_operation_session_info.h +++ b/src/mongo/db/initialize_operation_session_info.h @@ -41,9 +41,13 @@ namespace mongo { * * requiresAuth specifies if the command we're initializing operationSessionInfo for requires * authorization or not. This can be determined by invoking ->requiresAuth() on the parsed command. + * + * canAcceptTxnNumber is true if the server is either a mongos or a member of a replica set. Throws + * if this value is false, and the command contains a transaction number. */ void initializeOperationSessionInfo(OperationContext* opCtx, const BSONObj& requestBody, - bool requiresAuth); + bool requiresAuth, + bool canAcceptTxnNumber); } // namespace mongo |