summaryrefslogtreecommitdiff
path: root/src/mongo/db/sessions_collection.h
diff options
context:
space:
mode:
authorsamantharitter <samantha.ritter@10gen.com>2017-10-06 15:12:40 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2017-10-11 00:52:09 -0400
commit45d35fe3fcefefe1282b8e0dfc8cd76cb247951d (patch)
tree6643f175807ae1c20902885846d29e888127f9a6 /src/mongo/db/sessions_collection.h
parent8b3694d704d4c472adba87e8fb0827372324c215 (diff)
downloadmongo-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.h10
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.