ClickHouse/tests/queries/0_stateless/02286_drop_filesystem_cache.reference

139 lines
3.7 KiB
Plaintext
Raw Normal View History

2022-05-30 22:46:21 +00:00
Using storage policy: s3_cache
2022-04-25 16:49:00 +00:00
-- { echo }
SET enable_filesystem_cache_on_write_operations=0;
DROP TABLE IF EXISTS test;
2022-05-30 22:46:21 +00:00
CREATE TABLE test (key UInt32, value String)
Engine=MergeTree()
ORDER BY key
SETTINGS storage_policy='s3_cache', min_bytes_for_wide_part = 10485760;
SYSTEM STOP MERGES;
2022-04-25 16:49:00 +00:00
SYSTEM DROP FILESYSTEM CACHE;
SELECT count() FROM system.filesystem_cache;
0
INSERT INTO test SELECT number, toString(number) FROM numbers(100);
SELECT * FROM test FORMAT Null;
SELECT count() FROM system.filesystem_cache;
2
2022-05-04 11:08:10 +00:00
SYSTEM DROP FILESYSTEM CACHE;
2022-04-25 16:49:00 +00:00
SELECT count() FROM system.filesystem_cache;
0
SELECT * FROM test FORMAT Null;
SELECT count() FROM system.filesystem_cache;
1
SYSTEM DROP FILESYSTEM CACHE './data'; -- { serverError 36 }
SELECT count() FROM system.filesystem_cache;
1
2022-05-30 22:46:21 +00:00
SELECT * FROM test FORMAT Null;
SELECT count() FROM system.filesystem_cache;
1
SELECT count()
FROM (
SELECT
arrayJoin(cache_paths) AS cache_path,
local_path,
remote_path
FROM
system.remote_data_paths
) AS data_paths
INNER JOIN system.filesystem_cache AS caches
2022-06-21 17:30:21 +00:00
ON data_paths.cache_path = caches.cache_path;
1
2022-05-30 22:46:21 +00:00
DROP TABLE test NO DELAY;
SELECT count() FROM system.filesystem_cache;
0
SELECT count()
FROM (
SELECT
arrayJoin(cache_paths) AS cache_path,
local_path,
remote_path
FROM
system.remote_data_paths
) AS data_paths
INNER JOIN system.filesystem_cache AS caches
2022-06-21 17:30:21 +00:00
ON data_paths.cache_path = caches.cache_path;
0
2022-04-25 16:49:00 +00:00
DROP TABLE IF EXISTS test2;
2022-05-30 22:46:21 +00:00
CREATE TABLE test2 (key UInt32, value String)
Engine=MergeTree()
ORDER BY key
SETTINGS storage_policy='s3_cache_2', min_bytes_for_wide_part = 10485760;
2022-04-25 16:49:00 +00:00
INSERT INTO test2 SELECT number, toString(number) FROM numbers(100);
SELECT * FROM test2 FORMAT Null;
SELECT count() FROM system.filesystem_cache;
2022-05-30 22:46:21 +00:00
2
SYSTEM DROP FILESYSTEM CACHE 's3_cache_2/';
SELECT count() FROM system.filesystem_cache;
0
Using storage policy: local_cache
-- { echo }
SET enable_filesystem_cache_on_write_operations=0;
DROP TABLE IF EXISTS test;
CREATE TABLE test (key UInt32, value String)
Engine=MergeTree()
ORDER BY key
SETTINGS storage_policy='local_cache', min_bytes_for_wide_part = 10485760;
SYSTEM STOP MERGES;
SYSTEM DROP FILESYSTEM CACHE;
SELECT count() FROM system.filesystem_cache;
0
INSERT INTO test SELECT number, toString(number) FROM numbers(100);
SELECT * FROM test FORMAT Null;
SELECT count() FROM system.filesystem_cache;
2
SYSTEM DROP FILESYSTEM CACHE;
SELECT count() FROM system.filesystem_cache;
0
SELECT * FROM test FORMAT Null;
SELECT count() FROM system.filesystem_cache;
1
SYSTEM DROP FILESYSTEM CACHE './data'; -- { serverError 36 }
SELECT count() FROM system.filesystem_cache;
1
SELECT * FROM test FORMAT Null;
2022-04-25 16:49:00 +00:00
SELECT count() FROM system.filesystem_cache;
2022-05-21 22:21:40 +00:00
1
2022-05-30 22:46:21 +00:00
SELECT count()
FROM (
SELECT
arrayJoin(cache_paths) AS cache_path,
local_path,
remote_path
FROM
system.remote_data_paths
) AS data_paths
INNER JOIN system.filesystem_cache AS caches
2022-06-21 17:30:21 +00:00
ON data_paths.cache_path = caches.cache_path;
0
2022-05-30 22:46:21 +00:00
DROP TABLE test NO DELAY;
SELECT count() FROM system.filesystem_cache;
0
SELECT count()
FROM (
SELECT
arrayJoin(cache_paths) AS cache_path,
local_path,
remote_path
FROM
system.remote_data_paths
) AS data_paths
INNER JOIN system.filesystem_cache AS caches
2022-06-21 17:30:21 +00:00
ON data_paths.cache_path = caches.cache_path;
0
2022-05-30 22:46:21 +00:00
DROP TABLE IF EXISTS test2;
CREATE TABLE test2 (key UInt32, value String)
Engine=MergeTree()
ORDER BY key
SETTINGS storage_policy='local_cache_2', min_bytes_for_wide_part = 10485760;
INSERT INTO test2 SELECT number, toString(number) FROM numbers(100);
SELECT * FROM test2 FORMAT Null;
SELECT count() FROM system.filesystem_cache;
2
SYSTEM DROP FILESYSTEM CACHE 'local_cache_2/';
SELECT count() FROM system.filesystem_cache;
0
2022-06-25 09:47:35 +00:00