summaryrefslogtreecommitdiff
path: root/src/mongo/db/keys_collection_client_sharded.h
diff options
context:
space:
mode:
authorCheahuychou Mao <mao.cheahuychou@gmail.com>2021-01-11 05:14:06 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-01-15 22:47:49 +0000
commitae738118f9f8f6ef93bc4482489cab9955a2bcb1 (patch)
tree3b6b21db4f7766de948666b6b5b188890f58dd35 /src/mongo/db/keys_collection_client_sharded.h
parentf99876a23cd41e89331a2fb2a3c3d799e2b514a7 (diff)
downloadmongo-ae738118f9f8f6ef93bc4482489cab9955a2bcb1.tar.gz
SERVER-53403 Support validating cluster times with keys from external_validation_keys
Diffstat (limited to 'src/mongo/db/keys_collection_client_sharded.h')
-rw-r--r--src/mongo/db/keys_collection_client_sharded.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/mongo/db/keys_collection_client_sharded.h b/src/mongo/db/keys_collection_client_sharded.h
index 111948e0139..5ab20a626cd 100644
--- a/src/mongo/db/keys_collection_client_sharded.h
+++ b/src/mongo/db/keys_collection_client_sharded.h
@@ -40,13 +40,25 @@ public:
KeysCollectionClientSharded(ShardingCatalogClient*);
/**
- * Returns keys for the given purpose and with an expiresAt value greater than newerThanThis,
- * using readConcern level majority if possible.
+ * Returns keys in the config server's admin.system.keys that match the given purpose and have
+ * an expiresAt value greater than newerThanThis. Uses readConcern level majority if possible.
*/
- StatusWith<std::vector<KeysCollectionDocument>> getNewKeys(OperationContext* opCtx,
- StringData purpose,
- const LogicalTime& newerThanThis,
- bool useMajority) override;
+ StatusWith<std::vector<KeysCollectionDocument>> getNewInternalKeys(
+ OperationContext* opCtx,
+ StringData purpose,
+ const LogicalTime& newerThanThis,
+ bool useMajority) override;
+
+ /**
+ * Returns validation-only keys copied from other clusters that match the given purpose
+ * and have an expiresAt value greater than newerThanThis. Uses readConcern level majority if
+ * possible. Currently, a sharded cluster never copies cluster time keys from other clusters.
+ */
+ StatusWith<std::vector<ExternalKeysCollectionDocument>> getNewExternalKeys(
+ OperationContext* opCtx,
+ StringData purpose,
+ const LogicalTime& newerThanThis,
+ bool useMajority) override;
/**
* Directly inserts a key document to the storage