mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Fix 03030_system_flush_distributed_settings flakiness
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
parent
75dd68ae2b
commit
37c66c8976
@ -1 +1 @@
|
||||
10000
|
||||
30000
|
||||
|
@ -6,15 +6,17 @@ drop table if exists dist_out;
|
||||
|
||||
create table ephemeral (key Int, value Int) engine=Null();
|
||||
create table dist_in as ephemeral engine=Distributed(test_shard_localhost, currentDatabase(), ephemeral, key) settings background_insert_batch=1;
|
||||
create table data (key Int, uniq_values Int) engine=Memory();
|
||||
create materialized view mv to data as select key, uniqExact(value) uniq_values from ephemeral group by key;
|
||||
create table data (key Int, uniq_values Int) engine=TinyLog();
|
||||
create materialized view mv to data as select key, uniqExact(value::String) uniq_values from ephemeral group by key;
|
||||
system stop distributed sends dist_in;
|
||||
create table dist_out as data engine=Distributed(test_shard_localhost, currentDatabase(), data);
|
||||
|
||||
set prefer_localhost_replica=0;
|
||||
SET optimize_trivial_insert_select = 1;
|
||||
|
||||
insert into dist_in select number/100, number from system.numbers limit 1e6 settings max_memory_usage='20Mi';
|
||||
-- due to pushing to MV with aggregation the query needs ~300MiB
|
||||
-- but it will be done in background via "system flush distributed"
|
||||
insert into dist_in select number/100, number from system.numbers limit 3e6 settings max_block_size=3e6, max_memory_usage='100Mi';
|
||||
system flush distributed dist_in; -- { serverError MEMORY_LIMIT_EXCEEDED }
|
||||
system flush distributed dist_in settings max_memory_usage=0;
|
||||
select count() from dist_out;
|
||||
|
Loading…
Reference in New Issue
Block a user