diff options
author | Blake Oler <blake.oler@mongodb.com> | 2018-10-10 10:48:11 -0400 |
---|---|---|
committer | Blake Oler <blake.oler@mongodb.com> | 2018-10-13 17:47:24 -0400 |
commit | 6894b72f134534c3739a66ed9eee11e265b9c1e1 (patch) | |
tree | 141d2c0600511357c8edf93ba5c4a7070be47b0f /src/mongo/db/sessions_collection.cpp | |
parent | aa89fef4ac12249077ff8701b465d0b9f733fd2c (diff) | |
download | mongo-6894b72f134534c3739a66ed9eee11e265b9c1e1.tar.gz |
SERVER-36964 Prevent secondaries in SessionsCollectionRS from attempting to set up the sessions collection.
Diffstat (limited to 'src/mongo/db/sessions_collection.cpp')
-rw-r--r-- | src/mongo/db/sessions_collection.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/sessions_collection.cpp b/src/mongo/db/sessions_collection.cpp index 612b918792a..0f550f273c9 100644 --- a/src/mongo/db/sessions_collection.cpp +++ b/src/mongo/db/sessions_collection.cpp @@ -46,6 +46,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. @@ -299,7 +301,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; |