This refactor ticket aims to split KeysCollectionCacheReaderAndUpdater into KeyGenerator and KeysCollectionCacheReader. To achieve this, we need to:
- Remove existing KeysCollectionCache.
- rename KeysCollectionCacheReader to KeysCollectionCache
- rename KeysCollectionCacheReaderAndUpdater to KeyGenerator
- change existing code in KeysCollectionManager to always have a KeysCollectionCache and create a KeyGenerator in here and destroy in here
change KeysCollectionCacheReaderAndUpdater to the following api:
class KeyGenerator {
Status generateNewKeysIfNeeded(OperationContext* opCtx);
// removed the getKey methods, existing callers should call the KeysCollectionCache instance instead.
};