summaryrefslogtreecommitdiff
path: root/src/mongo/db/keys_collection_manager.h
diff options
context:
space:
mode:
authorJack Mulrow <jack.mulrow@mongodb.com>2017-06-15 18:19:42 -0400
committerJack Mulrow <jack.mulrow@mongodb.com>2017-06-22 10:09:12 -0400
commit0d79ab8b66fcaf06bf5622de580ed5a85c95bc16 (patch)
tree688fa34e05a158020f8f28e8d1891b95d4ddbacb /src/mongo/db/keys_collection_manager.h
parent67d75157ae993359575e5fb567557d82b016877e (diff)
downloadmongo-0d79ab8b66fcaf06bf5622de580ed5a85c95bc16.tar.gz
SERVER-29652 mongos should not gossip logical time until admin.system.keys is created
Diffstat (limited to 'src/mongo/db/keys_collection_manager.h')
-rw-r--r--src/mongo/db/keys_collection_manager.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mongo/db/keys_collection_manager.h b/src/mongo/db/keys_collection_manager.h
index bfe4a27a408..9333ba284d9 100644
--- a/src/mongo/db/keys_collection_manager.h
+++ b/src/mongo/db/keys_collection_manager.h
@@ -98,6 +98,11 @@ public:
*/
void enableKeyGenerator(OperationContext* opCtx, bool doEnable);
+ /**
+ * Returns true if the refresher has ever successfully returned keys from the config server.
+ */
+ bool hasSeenKeys();
+
private:
/**
* This is responsible for periodically performing refresh in the background.
@@ -143,6 +148,11 @@ private:
*/
void stop();
+ /**
+ * Returns true if keys have ever successfully been returned from the config server.
+ */
+ bool hasSeenKeys();
+
private:
void _doPeriodicRefresh(ServiceContext* service,
std::string threadName,
@@ -155,6 +165,7 @@ private:
stdx::thread _backgroundThread;
std::shared_ptr<RefreshFunc> _doRefresh;
+ bool _hasSeenKeys = false;
bool _inShutdown = false;
};