From 8012951e7728e242cddc4f9dcf190784490e123e Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Fri, 18 Dec 2020 11:34:20 +0300 Subject: [PATCH] Add test. --- .../01603_read_with_backoff_bug.reference | 3 +++ .../0_stateless/01603_read_with_backoff_bug.sql | 15 +++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 tests/queries/0_stateless/01603_read_with_backoff_bug.reference create mode 100644 tests/queries/0_stateless/01603_read_with_backoff_bug.sql diff --git a/tests/queries/0_stateless/01603_read_with_backoff_bug.reference b/tests/queries/0_stateless/01603_read_with_backoff_bug.reference new file mode 100644 index 00000000000..c7075162d9c --- /dev/null +++ b/tests/queries/0_stateless/01603_read_with_backoff_bug.reference @@ -0,0 +1,3 @@ +24972288 1522399120 +24972288 1522399120 +24972288 1522399120 diff --git a/tests/queries/0_stateless/01603_read_with_backoff_bug.sql b/tests/queries/0_stateless/01603_read_with_backoff_bug.sql new file mode 100644 index 00000000000..e80d657fdb4 --- /dev/null +++ b/tests/queries/0_stateless/01603_read_with_backoff_bug.sql @@ -0,0 +1,15 @@ +drop table if exists t; + +create table t (x UInt64, s String) engine = MergeTree order by x; +INSERT INTO t SELECT + number, + if(number < (8129 * 1024), arrayStringConcat(arrayMap(x -> toString(x), range(number % 128)), ' '), '') +FROM numbers_mt((8129 * 1024) * 3) settings max_insert_threads=8; + +-- optimize table t final; + +select count(), sum(length(s)) from t settings max_threads = 3, read_backoff_min_latency_ms = 1, read_backoff_max_throughput = 1000000000, read_backoff_min_interval_between_events_ms = 1, read_backoff_min_events = 1, read_backoff_min_concurrency = 1; +select count(), sum(length(s)) from t settings max_threads = 3, read_backoff_min_latency_ms = 1, read_backoff_max_throughput = 1000000000, read_backoff_min_interval_between_events_ms = 1, read_backoff_min_events = 1, read_backoff_min_concurrency = 1; +select count(), sum(length(s)) from t settings max_threads = 3, read_backoff_min_latency_ms = 1, read_backoff_max_throughput = 1000000000, read_backoff_min_interval_between_events_ms = 1, read_backoff_min_events = 1, read_backoff_min_concurrency = 1; + +drop table if exists t;