diff options
author | samantharitter <samantha.ritter@10gen.com> | 2017-10-06 15:12:40 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-10-11 00:52:09 -0400 |
commit | 45d35fe3fcefefe1282b8e0dfc8cd76cb247951d (patch) | |
tree | 6643f175807ae1c20902885846d29e888127f9a6 /src/mongo/db/sessions_collection.h | |
parent | 8b3694d704d4c472adba87e8fb0827372324c215 (diff) | |
download | mongo-45d35fe3fcefefe1282b8e0dfc8cd76cb247951d.tar.gz |
SERVER-31184 Make servers automatically set up config.system.sessions
Diffstat (limited to 'src/mongo/db/sessions_collection.h')
-rw-r--r-- | src/mongo/db/sessions_collection.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mongo/db/sessions_collection.h b/src/mongo/db/sessions_collection.h index 63fd34667cf..3f6baaac2d0 100644 --- a/src/mongo/db/sessions_collection.h +++ b/src/mongo/db/sessions_collection.h @@ -56,6 +56,11 @@ public: static const NamespaceString kSessionsNamespaceString; /** + * Ensures that the sessions collection exists and has the proper indexes. + */ + virtual Status setupSessionsCollection(OperationContext* opCtx) = 0; + + /** * Updates the last-use times on the given sessions to be greater than * or equal to the given time. Returns an error if a networking issue occurred. */ @@ -83,6 +88,11 @@ public: virtual StatusWith<LogicalSessionIdSet> findRemovedSessions( OperationContext* opCtx, const LogicalSessionIdSet& sessions) = 0; + /** + * Generates a createIndexes command for the sessions collection TTL index. + */ + static BSONObj generateCreateIndexesCmd(); + protected: /** * Makes a send function for the given client. |