summaryrefslogtreecommitdiff
path: root/src/mongo/db/keys_collection_client.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.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.h')
-rw-r--r--src/mongo/db/keys_collection_client.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/mongo/db/keys_collection_client.h b/src/mongo/db/keys_collection_client.h
index a805300da2b..7bb4f16341d 100644
--- a/src/mongo/db/keys_collection_client.h
+++ b/src/mongo/db/keys_collection_client.h
@@ -46,10 +46,22 @@ public:
virtual ~KeysCollectionClient() = default;
/**
- * Returns keys for the given purpose and with an expiresAt value greater than newerThanThis,
- * using readConcern level majority if possible.
+ * Returns internal keys (keys for signing and validating cluster times created by nodes in the
+ * clusters that this node is in) that match the given purpose and have an expiresAt value
+ * greater than newerThanThis. Uses readConcern level majority if possible.
*/
- virtual StatusWith<std::vector<KeysCollectionDocument>> getNewKeys(
+ virtual StatusWith<std::vector<KeysCollectionDocument>> getNewInternalKeys(
+ OperationContext* opCtx,
+ StringData purpose,
+ const LogicalTime& newerThanThis,
+ bool useMajority) = 0;
+
+ /**
+ * Returns external keys (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.
+ */
+ virtual StatusWith<std::vector<ExternalKeysCollectionDocument>> getNewExternalKeys(
OperationContext* opCtx,
StringData purpose,
const LogicalTime& newerThanThis,