diff options
author | Andrew Morrow <acm@mongodb.com> | 2019-02-21 10:59:56 -0500 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2019-02-22 09:15:14 -0500 |
commit | 6cbe66fb2f5ec6579d21ec3a5a19ccaf669c8f61 (patch) | |
tree | 09d6d0cbf61482892ca86445aec6693c201e6507 /src/mongo/db | |
parent | 0859dc10b4a43847ee1830de8b80216060a76874 (diff) | |
download | mongo-6cbe66fb2f5ec6579d21ec3a5a19ccaf669c8f61.tar.gz |
SERVER-39535 Update localLogicalSessionTimeoutMinutes param to IDL
Diffstat (limited to 'src/mongo/db')
-rw-r--r-- | src/mongo/db/logical_session_id.cpp | 4 | ||||
-rw-r--r-- | src/mongo/db/logical_session_id.h | 6 | ||||
-rw-r--r-- | src/mongo/db/logical_session_id.idl | 8 |
3 files changed, 12 insertions, 6 deletions
diff --git a/src/mongo/db/logical_session_id.cpp b/src/mongo/db/logical_session_id.cpp index a3b525a677b..61d571a5765 100644 --- a/src/mongo/db/logical_session_id.cpp +++ b/src/mongo/db/logical_session_id.cpp @@ -34,10 +34,6 @@ namespace mongo { -MONGO_EXPORT_STARTUP_SERVER_PARAMETER(localLogicalSessionTimeoutMinutes, - int, - kLogicalSessionDefaultTimeout.count()); - LogicalSessionId makeLogicalSessionIdForTest() { LogicalSessionId lsid; diff --git a/src/mongo/db/logical_session_id.h b/src/mongo/db/logical_session_id.h index 6cae644c23c..781f2e13ecb 100644 --- a/src/mongo/db/logical_session_id.h +++ b/src/mongo/db/logical_session_id.h @@ -52,8 +52,10 @@ const TxnNumber kUninitializedTxnNumber = -1; class BSONObjBuilder; class OperationContext; -const Minutes kLogicalSessionDefaultTimeout = Minutes(30); -extern int localLogicalSessionTimeoutMinutes; +// The constant kLocalLogicalSessionTimeoutMinutesDefault comes from the generated +// header logical_session_id_gen.h. +constexpr Minutes kLogicalSessionDefaultTimeout = + Minutes(kLocalLogicalSessionTimeoutMinutesDefault); inline bool operator==(const LogicalSessionId& lhs, const LogicalSessionId& rhs) { auto makeEqualityLens = [](const auto& lsid) { return std::tie(lsid.getId(), lsid.getUid()); }; diff --git a/src/mongo/db/logical_session_id.idl b/src/mongo/db/logical_session_id.idl index 0a228e7d548..50bd156f130 100644 --- a/src/mongo/db/logical_session_id.idl +++ b/src/mongo/db/logical_session_id.idl @@ -186,3 +186,11 @@ structs: batchSize: int singleBatch: bool limit: int + +server_parameters: + localLogicalSessionTimeoutMinutes: + description: 'The time in minutes that a session remains active after its most recent use' + set_at: [ startup ] + cpp_vartype: int + cpp_varname: localLogicalSessionTimeoutMinutes + default: 30 |