Add comment

This commit is contained in:
kssenii 2023-03-22 17:01:31 +01:00
parent 876fb55156
commit 9b9cf13607
2 changed files with 13 additions and 2 deletions

View File

@ -48,8 +48,6 @@ public:
FileCache(const String & cache_base_path_, const FileCacheSettings & cache_settings_);
~FileCache() = default;
void initialize();
const String & getBasePath() const { return cache_base_path; }

View File

@ -43,6 +43,19 @@ namespace DB
* Rules:
* 1. Priority of locking: CacheGuard::Lock > CacheMetadataGuard::Lock > KeyGuard::Lock > FileSegmentGuard::Lock
* 2. If we take more than one key lock at a moment of time, we need to take CacheGuard::Lock (example: tryReserve())
*
*
* _CacheGuard_
* 1. FileCache::tryReserve
* 2. FileCache::removeIfExists(key)
* 3. FileCache::removeAllReleasable
* 4. FileSegment::complete
*
* _KeyGuard_ _CacheMetadataGuard_
* 1. all from CacheGuard 1. getOrSet/get/set
* 2. getOrSet/get/Set
*
* *This table does not include locks taken for introspection and system tables.
*/
/**