Fix flaky test and add separate to show unexpected behaviour

This commit is contained in:
Yatsishin Ilya 2024-03-12 17:03:11 +00:00
parent 14e560a191
commit 8abb85948c
3 changed files with 19 additions and 1 deletions

View File

@ -5,7 +5,8 @@ SYSTEM STOP MERGES too_many_parts;
SET max_block_size = 1, min_insert_block_size_rows = 0, min_insert_block_size_bytes = 0;
-- exception is not thrown if threshold is exceeded when multi-block INSERT is already started.
INSERT INTO too_many_parts SELECT * FROM numbers(10);
-- Single thread is used as different threads check it separately https://github.com/ClickHouse/ClickHouse/issues/61158
INSERT INTO too_many_parts SELECT * FROM numbers(10) SETTINGS max_insert_threads=1;
SELECT count() FROM too_many_parts;
-- exception is thrown if threshold is exceeded on new INSERT.

View File

@ -0,0 +1,16 @@
# Tags: disabled
# TODO: Fix parts_to_throw_insert logic for parallel MergeTreeSink onStart calls
DROP TABLE IF EXISTS too_many_parts;
CREATE TABLE too_many_parts (x UInt64) ENGINE = MergeTree ORDER BY tuple() SETTINGS parts_to_delay_insert = 5, parts_to_throw_insert = 5;
SYSTEM STOP MERGES too_many_parts;
SET max_block_size = 1, min_insert_block_size_rows = 0, min_insert_block_size_bytes = 0, max_threads=100, max_insert_threads=100;
-- exception is not thrown if threshold is exceeded when multi-block INSERT is already started.
INSERT INTO too_many_parts SELECT * FROM numbers_mt(100);
SELECT count() FROM too_many_parts;
INSERT INTO too_many_parts SELECT * FROM numbers_mt(10); -- { serverError 252 }
DROP TABLE too_many_parts;