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); auto impl = DiskDecorator::writeFile(path, buf_size, mode, settings);
bool cache_on_write = fs::path(path).extension() != ".tmp" 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) if (cache_on_write)
return std::make_unique<CachedWriteBuffer>(std::move(impl), cache, impl->getFileName()); return std::make_unique<CachedWriteBuffer>(std::move(impl), cache, impl->getFileName());

View File

@ -1,14 +1,17 @@
<clickhouse> <clickhouse>
<storage_configuration> <storage_configuration>
<disks> <disks>
<s3_cache> <s3_disk>
<type>s3</type> <type>s3</type>
<endpoint>http://localhost:11111/test/00170_test/</endpoint> <endpoint>http://localhost:11111/test/00170_test/</endpoint>
<access_key_id>clickhouse</access_key_id> <access_key_id>clickhouse</access_key_id>
<secret_access_key>clickhouse</secret_access_key> <secret_access_key>clickhouse</secret_access_key>
<data_cache_enabled>1</data_cache_enabled> </s3_disk>
<cache_enabled>0</cache_enabled> <s3_cache>
<data_cache_max_size>22548578304</data_cache_max_size> <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> <cache_on_write_operations>1</cache_on_write_operations>
</s3_cache> </s3_cache>
</disks> </disks>