Merge pull request #55002 from kssenii/fix-broken-test

Fix broken test
This commit is contained in:
Kseniia Sumarokova 2023-09-29 11:13:31 +02:00 committed by GitHub
commit 0b71fd0050
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 20 additions and 6 deletions

View File

@ -69,6 +69,16 @@ else
fi fi
if [[ -n "$USE_DATABASE_REPLICATED" ]] && [[ "$USE_DATABASE_REPLICATED" -eq 1 ]]; then if [[ -n "$USE_DATABASE_REPLICATED" ]] && [[ "$USE_DATABASE_REPLICATED" -eq 1 ]]; then
sudo cat /etc/clickhouse-server1/config.d/filesystem_caches_path.xml \
| sed "s|<filesystem_caches_path>/var/lib/clickhouse/filesystem_caches/</filesystem_caches_path>|<filesystem_caches_path>/var/lib/clickhouse/filesystem_caches_1/</filesystem_caches_path>|" \
> /etc/clickhouse-server1/config.d/filesystem_caches_path.xml.tmp
mv /etc/clickhouse-server1/config.d/filesystem_caches_path.xml.tmp /etc/clickhouse-server1/config.d/filesystem_caches_path.xml
sudo cat /etc/clickhouse-server2/config.d/filesystem_caches_path.xml \
| sed "s|<filesystem_caches_path>/var/lib/clickhouse/filesystem_caches/</filesystem_caches_path>|<filesystem_caches_path>/var/lib/clickhouse/filesystem_caches_2/</filesystem_caches_path>|" \
> /etc/clickhouse-server2/config.d/filesystem_caches_path.xml.tmp
mv /etc/clickhouse-server2/config.d/filesystem_caches_path.xml.tmp /etc/clickhouse-server2/config.d/filesystem_caches_path.xml
mkdir -p /var/run/clickhouse-server1 mkdir -p /var/run/clickhouse-server1
sudo chown clickhouse:clickhouse /var/run/clickhouse-server1 sudo chown clickhouse:clickhouse /var/run/clickhouse-server1
sudo -E -u clickhouse /usr/bin/clickhouse server --config /etc/clickhouse-server1/config.xml --daemon \ sudo -E -u clickhouse /usr/bin/clickhouse server --config /etc/clickhouse-server1/config.xml --daemon \

View File

@ -123,6 +123,8 @@ void FileCache::initialize()
{ {
fs::create_directories(getBasePath()); fs::create_directories(getBasePath());
} }
status_file = make_unique<StatusFile>(fs::path(getBasePath()) / "status", StatusFile::write_full_info);
} }
catch (...) catch (...)
{ {

View File

@ -13,6 +13,7 @@
#include <IO/ReadSettings.h> #include <IO/ReadSettings.h>
#include <Common/ThreadPool.h> #include <Common/ThreadPool.h>
#include <Common/StatusFile.h>
#include <Interpreters/Cache/LRUFileCachePriority.h> #include <Interpreters/Cache/LRUFileCachePriority.h>
#include <Interpreters/Cache/FileCache_fwd.h> #include <Interpreters/Cache/FileCache_fwd.h>
#include <Interpreters/Cache/FileSegment.h> #include <Interpreters/Cache/FileSegment.h>
@ -166,6 +167,7 @@ private:
std::exception_ptr init_exception; std::exception_ptr init_exception;
std::atomic<bool> is_initialized = false; std::atomic<bool> is_initialized = false;
mutable std::mutex init_mutex; mutable std::mutex init_mutex;
std::unique_ptr<StatusFile> status_file;
CacheMetadata metadata; CacheMetadata metadata;

View File

@ -12,7 +12,7 @@ SETTINGS min_bytes_for_wide_part = 10485760,
disk = disk( disk = disk(
type = cache, type = cache,
max_size = '128Mi', max_size = '128Mi',
path = '${CLICKHOUSE_TEST_UNIQUE_NAME}_cache', path = 'filesystem_cache_bypass_cache_threshold/',
enable_bypass_cache_with_threshold = 1, enable_bypass_cache_with_threshold = 1,
bypass_cache_threshold = 100, bypass_cache_threshold = 100,
delayed_cleanup_interval_ms = 100, delayed_cleanup_interval_ms = 100,

View File

@ -15,7 +15,7 @@ SETTINGS min_bytes_for_wide_part = 10485760,
disk = disk( disk = disk(
type = cache, type = cache,
max_size = '128Mi', max_size = '128Mi',
path = '${CLICKHOUSE_TEST_UNIQUE_NAME}_cache', path = 'filesystem_cache_bypass_cache_threshold/',
enable_bypass_cache_with_threshold = 1, enable_bypass_cache_with_threshold = 1,
bypass_cache_threshold = 100, bypass_cache_threshold = 100,
delayed_cleanup_interval_ms = 100, delayed_cleanup_interval_ms = 100,

View File

@ -14,7 +14,7 @@ SETTINGS min_bytes_for_wide_part = 10485760,
disk = disk( disk = disk(
type = cache, type = cache,
max_size = '128Mi', max_size = '128Mi',
path = '${CLICKHOUSE_TEST_UNIQUE_NAME}_cache', path = 'filesystem_query_cache/',
cache_on_write_operations= 1, cache_on_write_operations= 1,
enable_filesystem_query_cache_limit = 1, enable_filesystem_query_cache_limit = 1,
delayed_cleanup_interval_ms = 100, delayed_cleanup_interval_ms = 100,

View File

@ -17,7 +17,7 @@ SETTINGS min_bytes_for_wide_part = 10485760,
disk = disk( disk = disk(
type = cache, type = cache,
max_size = '128Mi', max_size = '128Mi',
path = '${CLICKHOUSE_TEST_UNIQUE_NAME}_cache', path = 'filesystem_query_cache/',
cache_on_write_operations= 1, cache_on_write_operations= 1,
enable_filesystem_query_cache_limit = 1, enable_filesystem_query_cache_limit = 1,
delayed_cleanup_interval_ms = 100, delayed_cleanup_interval_ms = 100,

View File

@ -1,4 +1,4 @@
-- Tags: no-fasttest -- Tags: no-fasttest, no-replicated-database
DROP TABLE IF EXISTS test; DROP TABLE IF EXISTS test;
DROP TABLE IF EXISTS test_1; DROP TABLE IF EXISTS test_1;
@ -41,5 +41,5 @@ ENGINE = MergeTree()
ORDER BY tuple() ORDER BY tuple()
SETTINGS disk = disk(type = cache, SETTINGS disk = disk(type = cache,
max_size = '1Mi', max_size = '1Mi',
path = 'kek', path = 'kek2',
disk = 'local_disk'); disk = 'local_disk');