This commit is contained in:
kssenii 2024-04-04 13:41:30 +02:00
parent 5ce8ab2bd9
commit 62f9be052c
4 changed files with 20 additions and 30 deletions

View File

@ -1379,16 +1379,6 @@ void FileCache::applySettingsIfPossible(const FileCacheSettings & new_settings,
}
}
{
auto cache_lock = lockCache();
LOG_TRACE(log, "new max size: {}, old max size: {}, "
"new elements count: {}, old_elements_count: {}, "
"current max size: {}, current max elements: {}",
new_settings.max_size, actual_settings.max_size,
new_settings.max_elements, actual_settings.max_elements,
main_priority->getSizeLimit(cache_lock), main_priority->getElementsLimit(cache_lock));
}
if (new_settings.max_size != actual_settings.max_size
|| new_settings.max_elements != actual_settings.max_elements)
{

View File

@ -162,10 +162,10 @@ void FileCacheFactory::updateSettingsFromConfig(const Poco::Util::AbstractConfig
continue;
}
LOG_TRACE(log, "Will apply settings changes for cache {}. "
"Settings changes: {} (new settings: {}, old_settings: {})",
cache_name, fmt::join(new_settings.getSettingsDiff(old_settings), ", "),
new_settings.toString(), old_settings.toString());
// LOG_TRACE(log, "Will apply settings changes for cache {}. "
// "Settings changes: {} (new settings: {}, old_settings: {})",
// cache_name, fmt::join(new_settings.getSettingsDiff(old_settings), ", "),
// new_settings.toString(), old_settings.toString());
try
{

View File

@ -102,21 +102,21 @@ void FileCacheSettings::loadFromCollection(const NamedCollection & collection)
std::string FileCacheSettings::toString() const
{
WriteBufferFromOwnString res;
res << "base_path: " << base_path << "\n";
res << "max_size: " << max_size << "\n";
res << "max_elements: " << max_elements << "\n";
res << "max_file_segment_size: " << max_file_segment_size << "\n";
res << "cache_on_write_operations: " << cache_on_write_operations << "\n";
res << "cache_hits_threshold: " << cache_hits_threshold << "\n";
res << "enable_filesystem_query_cache_limit: " << enable_filesystem_query_cache_limit << "\n";
res << "bypass_cache_threshold: " << bypass_cache_threshold << "\n";
res << "boundary_alignment: " << boundary_alignment << "\n";
res << "background_download_threads: " << background_download_threads << "\n";
res << "background_download_queue_size_limit: " << background_download_queue_size_limit << "\n";
res << "load_metadata_threads: " << load_metadata_threads << "\n";
res << "write_cache_per_user_id_directory: " << write_cache_per_user_id_directory << "\n";
res << "cache_policy: " << cache_policy << "\n";
res << "slru_size_ratio: " << slru_size_ratio << "\n";
res << "base_path: " << base_path << ", ";
res << "max_size: " << max_size << ", ";
res << "max_elements: " << max_elements << ", ";
res << "max_file_segment_size: " << max_file_segment_size << ", ";
res << "cache_on_write_operations: " << cache_on_write_operations << ", ";
res << "cache_hits_threshold: " << cache_hits_threshold << ", ";
res << "enable_filesystem_query_cache_limit: " << enable_filesystem_query_cache_limit << ", ";
res << "bypass_cache_threshold: " << bypass_cache_threshold << ", ";
res << "boundary_alignment: " << boundary_alignment << ", ";
res << "background_download_threads: " << background_download_threads << ", ";
res << "background_download_queue_size_limit: " << background_download_queue_size_limit << ", ";
res << "load_metadata_threads: " << load_metadata_threads << ", ";
res << "write_cache_per_user_id_directory: " << write_cache_per_user_id_directory << ", ";
res << "cache_policy: " << cache_policy << ", ";
res << "slru_size_ratio: " << slru_size_ratio << ", ";
return res.str();
}

View File

@ -19,7 +19,7 @@
<type>cache</type>
<disk>s3_disk</disk>
<path>s3_cache/</path>
<max_size>64Mi</max_size>
<max_size>104857600</max_size>
<cache_on_write_operations>1</cache_on_write_operations>
<delayed_cleanup_interval_ms>100</delayed_cleanup_interval_ms>
<cache_policy>LRU</cache_policy>