summaryrefslogtreecommitdiff
path: root/src/mongo/db/sessions_collection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/sessions_collection.cpp')
-rw-r--r--src/mongo/db/sessions_collection.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/sessions_collection.cpp b/src/mongo/db/sessions_collection.cpp
index eee9445d85c..05b6df1666c 100644
--- a/src/mongo/db/sessions_collection.cpp
+++ b/src/mongo/db/sessions_collection.cpp
@@ -48,6 +48,8 @@
namespace mongo {
+constexpr StringData SessionsCollection::kSessionsTTLIndex;
+
namespace {
// This batch size is chosen to ensure that we don't form requests larger than the 16mb limit.
@@ -304,7 +306,7 @@ StatusWith<LogicalSessionIdSet> SessionsCollection::doFetch(const NamespaceStrin
BSONObj SessionsCollection::generateCreateIndexesCmd() {
NewIndexSpec index;
index.setKey(BSON("lastUse" << 1));
- index.setName("lsidTTLIndex");
+ index.setName(kSessionsTTLIndex);
index.setExpireAfterSeconds(localLogicalSessionTimeoutMinutes * 60);
std::vector<NewIndexSpec> indexes;