mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-05 22:12:21 +00:00
Better name
This commit is contained in:
parent
48fe9605a8
commit
3c26d51220
@ -265,7 +265,7 @@ void CacheMetadata::removeAllKeys(bool if_releasable)
|
||||
bool removed_all = locked_key->removeAllFileSegments(if_releasable);
|
||||
if (removed_all)
|
||||
{
|
||||
it = removeKeyImpl(it, *locked_key, lock);
|
||||
it = removeEmptyKey(it, *locked_key, lock);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@ -297,10 +297,10 @@ void CacheMetadata::removeKey(const Key & key, bool if_exists, bool if_releasabl
|
||||
|
||||
bool removed_all = locked_key->removeAllFileSegments(if_releasable);
|
||||
if (removed_all)
|
||||
removeKeyImpl(it, *locked_key, metadata_lock);
|
||||
removeEmptyKey(it, *locked_key, metadata_lock);
|
||||
}
|
||||
|
||||
CacheMetadata::iterator CacheMetadata::removeKeyImpl(iterator it, LockedKey & locked_key, const CacheMetadataGuard::Lock &)
|
||||
CacheMetadata::iterator CacheMetadata::removeEmptyKey(iterator it, LockedKey & locked_key, const CacheMetadataGuard::Lock &)
|
||||
{
|
||||
const auto & key = locked_key.getKey();
|
||||
|
||||
@ -407,7 +407,7 @@ void CacheMetadata::cleanupThreadFunc()
|
||||
auto locked_key = it->second->lockNoStateCheck();
|
||||
if (locked_key->getKeyState() == KeyMetadata::KeyState::REMOVING)
|
||||
{
|
||||
removeKeyImpl(it, *locked_key, lock);
|
||||
removeEmptyKey(it, *locked_key, lock);
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
|
@ -128,7 +128,7 @@ public:
|
||||
|
||||
/// Firstly, this cleanup does not delete cache files,
|
||||
/// but only empty keys from cache_metadata_map and key (prefix) directories from fs.
|
||||
/// Secondly, it deletes those only if arised as a result of
|
||||
/// Secondly, it deletes those only if arose as a result of
|
||||
/// (1) eviction in FileCache::tryReserve();
|
||||
/// (2) removal of cancelled non-downloaded file segments after FileSegment::complete().
|
||||
/// which does not include removal of cache files because of FileCache::removeKey/removeAllKeys,
|
||||
@ -150,7 +150,7 @@ private:
|
||||
Poco::Logger * log;
|
||||
|
||||
void downloadImpl(FileSegment & file_segment, std::optional<Memory<>> & memory);
|
||||
iterator removeKeyImpl(iterator it, LockedKey &, const CacheMetadataGuard::Lock &);
|
||||
iterator removeEmptyKey(iterator it, LockedKey &, const CacheMetadataGuard::Lock &);
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user