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

Support clang-17 #51300

Merged
merged 1 commit into from Jun 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/Interpreters/Cache/FileCache.cpp
Expand Up @@ -703,21 +703,21 @@ bool FileCache::tryReserve(FileSegment & file_segment, const size_t size)
&freeable_count,
&file_segment,
&cache_lock,
main_priority = this->main_priority.get(),
log = this->log]
my_main_priority = this->main_priority.get(),
my_log = this->log]
{
const bool is_overflow =
/// size_limit == 0 means unlimited cache size
(main_priority_size_limit != 0 && (main_priority->getSize(cache_lock) + size - freeable_space > main_priority_size_limit))
(main_priority_size_limit != 0 && (my_main_priority->getSize(cache_lock) + size - freeable_space > main_priority_size_limit))
/// elements_limit == 0 means unlimited number of cache elements
|| (main_priority_elements_limit != 0 && freeable_count == 0
&& main_priority->getElementsCount(cache_lock) == main_priority_elements_limit);
&& my_main_priority->getElementsCount(cache_lock) == main_priority_elements_limit);

LOG_TEST(
log, "Overflow: {}, size: {}, ready to remove: {} ({} in number), current cache size: {}/{}, elements: {}/{}, while reserving for {}:{}",
my_log, "Overflow: {}, size: {}, ready to remove: {} ({} in number), current cache size: {}/{}, elements: {}/{}, while reserving for {}:{}",
is_overflow, size, freeable_space, freeable_count,
main_priority->getSize(cache_lock), main_priority->getSizeLimit(),
main_priority->getElementsCount(cache_lock), main_priority->getElementsLimit(),
my_main_priority->getSize(cache_lock), my_main_priority->getSizeLimit(),
my_main_priority->getElementsCount(cache_lock), my_main_priority->getElementsLimit(),
file_segment.key(), file_segment.offset());

return is_overflow;
Expand Down