From 28e0e64638b2487282bb0f5de85ee530dc1e55c0 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sun, 11 Aug 2019 23:04:14 +0300 Subject: [PATCH] Added a test --- .../00989_parallel_parts_loading.reference | 2 ++ .../00989_parallel_parts_loading.sql | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 dbms/tests/queries/0_stateless/00989_parallel_parts_loading.reference create mode 100644 dbms/tests/queries/0_stateless/00989_parallel_parts_loading.sql diff --git a/dbms/tests/queries/0_stateless/00989_parallel_parts_loading.reference b/dbms/tests/queries/0_stateless/00989_parallel_parts_loading.reference new file mode 100644 index 00000000000..aa6663eb9c7 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00989_parallel_parts_loading.reference @@ -0,0 +1,2 @@ +1000 499500 +1000 499500 diff --git a/dbms/tests/queries/0_stateless/00989_parallel_parts_loading.sql b/dbms/tests/queries/0_stateless/00989_parallel_parts_loading.sql new file mode 100644 index 00000000000..5e0011483b3 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00989_parallel_parts_loading.sql @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS mt; + +CREATE TABLE mt (x UInt64) ENGINE = MergeTree ORDER BY x SETTINGS max_part_loading_threads = 16, parts_to_delay_insert = 100000, parts_to_throw_insert = 100000; + +SYSTEM STOP MERGES; + +SET max_block_size = 1, min_insert_block_size_rows = 0, min_insert_block_size_bytes = 0; +INSERT INTO mt SELECT * FROM numbers(1000); +SET max_block_size = 65536; + +SELECT count(), sum(x) FROM mt; + +DETACH TABLE mt; +ATTACH TABLE mt; + +SELECT count(), sum(x) FROM mt; + +SYSTEM START MERGES; +DROP TABLE mt;