Update config

This commit is contained in:
kssenii 2022-04-13 15:11:40 +02:00
parent 37242a0103
commit 7f78196b68
2 changed files with 9 additions and 5 deletions

View File

@ -121,7 +121,8 @@ std::unique_ptr<WriteBufferFromFileBase> DiskCache::writeFile(
auto impl = DiskDecorator::writeFile(path, buf_size, mode, settings);
bool cache_on_write = fs::path(path).extension() != ".tmp"
&& settings.enable_filesystem_cache_on_write_operations;
&& settings.enable_filesystem_cache_on_write_operations
&& FileCacheFactory::instance().getSettings(cache_base_path).cache_on_write_operations;
if (cache_on_write)
return std::make_unique<CachedWriteBuffer>(std::move(impl), cache, impl->getFileName());

View File

@ -1,14 +1,17 @@
<clickhouse>
<storage_configuration>
<disks>
<s3_cache>
<s3_disk>
<type>s3</type>
<endpoint>http://localhost:11111/test/00170_test/</endpoint>
<access_key_id>clickhouse</access_key_id>
<secret_access_key>clickhouse</secret_access_key>
<data_cache_enabled>1</data_cache_enabled>
<cache_enabled>0</cache_enabled>
<data_cache_max_size>22548578304</data_cache_max_size>
</s3_disk>
<s3_cache>
<type>cache</type>
<disk>s3_disk</disk>
<path>s3_disk_cache/</path>
<max_size>22548578304</max_size>
<cache_on_write_operations>1</cache_on_write_operations>
</s3_cache>
</disks>