diff options
author | Randolph Tan <randolph@10gen.com> | 2018-02-26 17:04:26 -0500 |
---|---|---|
committer | Randolph Tan <randolph@10gen.com> | 2018-03-01 14:03:46 -0500 |
commit | 9b9cea70eea59d9a4ad951dc37edc0a29a7b7b9f (patch) | |
tree | 8303705f4bf2df30b9fe833f9c27c1107e76e93b /src | |
parent | 67af2fc406b8e9118ae66fb9bb17e72a77850b83 (diff) | |
download | mongo-9b9cea70eea59d9a4ad951dc37edc0a29a7b7b9f.tar.gz |
SERVER-33449 Seg fault at HMAC keys background thread during rollback
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/keys_collection_cache.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/keys_collection_cache.cpp b/src/mongo/db/keys_collection_cache.cpp index 4dd2c28b31d..250655ec6c5 100644 --- a/src/mongo/db/keys_collection_cache.cpp +++ b/src/mongo/db/keys_collection_cache.cpp @@ -67,7 +67,9 @@ StatusWith<KeysCollectionDocument> KeysCollectionCache::refresh(OperationContext // _cache cleared while we getting the new keys, just return the newest key without // touching the _cache so the next refresh will populate it properly. // Note: newKeys are sorted. - return std::move(newKeys.back()); + if (!newKeys.empty()) { + return std::move(newKeys.back()); + } } for (auto&& key : newKeys) { |