Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a test for IO throttling for ALTER TABLE MOVE PARTITION TO VOLUME
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
- Loading branch information
Showing
3 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
tests/queries/0_stateless/02870_move_partition_to_volume_io_throttling.reference
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
default tuple() 1000000 | ||
Alter 1 | ||
s3_disk tuple() 1000000 |
11 changes: 11 additions & 0 deletions
11
tests/queries/0_stateless/02870_move_partition_to_volume_io_throttling.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |