mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
Add a test for IO throttling for ALTER TABLE MOVE PARTITION TO VOLUME
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
parent
51e8b16916
commit
ed401cba9b
@ -72,6 +72,12 @@
|
||||
</s3_cache_multi_2>
|
||||
</disks>
|
||||
<policies>
|
||||
<local_remote>
|
||||
<volumes>
|
||||
<local><disk>default</disk></local>
|
||||
<remote><disk>s3_disk</disk></remote>
|
||||
</volumes>
|
||||
</local_remote>
|
||||
<s3_cache>
|
||||
<volumes>
|
||||
<main>
|
||||
|
@ -0,0 +1,3 @@
|
||||
default tuple() 1000000
|
||||
Alter 1
|
||||
s3_disk tuple() 1000000
|
@ -0,0 +1,11 @@
|
||||
-- Tags: no-random-merge-tree-settings, no-fasttest
|
||||
-- Tag: no-fasttest -- requires S3
|
||||
|
||||
CREATE TABLE test_move_partition_throttling (key UInt64 CODEC(NONE)) ENGINE = MergeTree ORDER BY tuple() SETTINGS storage_policy='local_remote';
|
||||
INSERT INTO test_move_partition_throttling SELECT number FROM numbers(1e6);
|
||||
SELECT disk_name, partition, rows FROM system.parts WHERE database = currentDatabase() AND table = 'test_move_partition_throttling' and active;
|
||||
ALTER TABLE test_move_partition_throttling MOVE PARTITION tuple() TO VOLUME 'remote' SETTINGS max_remote_write_network_bandwidth=1600000;
|
||||
SYSTEM FLUSH LOGS;
|
||||
-- (8e6-1600000)/1600000=4.0
|
||||
SELECT query_kind, query_duration_ms>4e3 FROM system.query_log WHERE type = 'QueryFinish' AND current_database = currentDatabase() AND query_kind = 'Alter';
|
||||
SELECT disk_name, partition, rows FROM system.parts WHERE database = currentDatabase() AND table = 'test_move_partition_throttling' and active;
|
Loading…
Reference in New Issue
Block a user