Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decoupling local cache function and cache algorithm #38048

Merged
Prev Previous commit
Next Next commit
fix
  • Loading branch information
KinderRiven committed Aug 10, 2022
commit 9ba94e64f97d738e17c0d99dfb5ed7c556ac9956
4 changes: 2 additions & 2 deletions src/Common/FileCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ void FileCache::removeIfReleasable(bool remove_persistent_files)

std::lock_guard cache_lock(mutex);

std::vector<FileSegment *> to_remove;
kssenii marked this conversation as resolved.
Show resolved Hide resolved
std::vector<FileSegmentPtr> to_remove;
for (auto it = main_priority->getLowestPriorityReadIterator(cache_lock); it->valid(); it->next())
{
const auto & key = it->key();
Expand All @@ -956,7 +956,7 @@ void FileCache::removeIfReleasable(bool remove_persistent_files)
|| remove_persistent_files
|| allow_to_remove_persistent_segments_from_cache_by_default))
{
to_remove.emplace_back(file_segment.get());
to_remove.emplace_back(file_segment);
}
}
}
Expand Down