summaryrefslogtreecommitdiff
path: root/src/mongo/db/initialize_operation_session_info.h
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2019-01-29 17:20:04 -0500
committerRandolph Tan <randolph@10gen.com>2019-02-04 10:40:01 -0500
commit473e96a92ce798edf48cc31b8a9f123609df4714 (patch)
treec46249a075701a32d00bf1d1726d9e0988954798 /src/mongo/db/initialize_operation_session_info.h
parent95c5d57d8a3f613ba79ef83a0390a8ba9bc8fc40 (diff)
downloadmongo-473e96a92ce798edf48cc31b8a9f123609df4714.tar.gz
SERVER-38335 Make killAllSessions not attach the lsid from request to OperationContext
This is to prevent it from killing itself.
Diffstat (limited to 'src/mongo/db/initialize_operation_session_info.h')
-rw-r--r--src/mongo/db/initialize_operation_session_info.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/initialize_operation_session_info.h b/src/mongo/db/initialize_operation_session_info.h
index 10c5953c557..c3a4074cdf8 100644
--- a/src/mongo/db/initialize_operation_session_info.h
+++ b/src/mongo/db/initialize_operation_session_info.h
@@ -37,7 +37,9 @@ namespace mongo {
/**
* Parses the session information from the body of a request and stores the sessionId and txnNumber
* on the current operation context. Must only be called once per operation and should be done right
- * in the beginning.
+ * in the beginning. Note that the session info will be stored in the operation context and returned
+ * only if the current request supports it. For example, if attachToOpCtx is false or this is called
+ * within the context of DBDirectClient.
*
* Throws if the sessionId/txnNumber combination is not properly formatted.
*
@@ -51,6 +53,7 @@ namespace mongo {
OperationSessionInfoFromClient initializeOperationSessionInfo(OperationContext* opCtx,
const BSONObj& requestBody,
bool requiresAuth,
+ bool attachToOpCtx,
bool isReplSetMemberOrMongos,
bool supportsDocLocking);