diff options
author | Jack Mulrow <jack.mulrow@mongodb.com> | 2021-02-02 23:25:27 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-02-06 00:05:34 +0000 |
commit | 4b426256d891781e14dda37646fb1aad51e6bd0c (patch) | |
tree | ed989ca9cc4384d6af920f9cd26f791a31bfb869 /src/mongo/db/keys_collection_client_direct.cpp | |
parent | 0b0acab69c72b76b671ab914ac24c15dbad53680 (diff) | |
download | mongo-4b426256d891781e14dda37646fb1aad51e6bd0c.tar.gz |
SERVER-54204 Load external validation keys with local read concern
Diffstat (limited to 'src/mongo/db/keys_collection_client_direct.cpp')
-rw-r--r-- | src/mongo/db/keys_collection_client_direct.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/db/keys_collection_client_direct.cpp b/src/mongo/db/keys_collection_client_direct.cpp index af1e90d57a5..69f6fc471c0 100644 --- a/src/mongo/db/keys_collection_client_direct.cpp +++ b/src/mongo/db/keys_collection_client_direct.cpp @@ -82,16 +82,16 @@ StatusWith<std::vector<KeysCollectionDocument>> KeysCollectionClientDirect::getN } StatusWith<std::vector<ExternalKeysCollectionDocument>> -KeysCollectionClientDirect::getNewExternalKeys(OperationContext* opCtx, - StringData purpose, - const LogicalTime& newerThanThis, - bool useMajority) { +KeysCollectionClientDirect::getAllExternalKeys(OperationContext* opCtx, StringData purpose) { return _getNewKeys<ExternalKeysCollectionDocument>( opCtx, NamespaceString::kExternalKeysCollectionNamespace, purpose, - newerThanThis, - useMajority); + LogicalTime(), + // It is safe to read external keys with local read concern because they are only used to + // validate incoming signatures, not to sign them. If a cached key is rolled back, it will + // eventually be reaped from the cache. + false /* useMajority */); } template <typename KeyDocumentType> |