Merge pull request #23617 from ClickHouse/fix-test-memory_tracking_insert_optimize_long

Fix bad test 01641_memory_tracking_insert_optimize_long
This commit is contained in:
alexey-milovidov 2021-04-26 00:47:32 +03:00 committed by GitHub
commit a77843bd7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 21 deletions

View File

@ -1,21 +0,0 @@
drop table if exists data_01641;
create table data_01641 (key Int, value String) engine=MergeTree order by (key, repeat(value, 10)) settings old_parts_lifetime=0, min_bytes_for_wide_part=0;
-- peak memory usage is 170MiB
set max_memory_usage='200Mi';
system stop merges data_01641;
insert into data_01641 select number, toString(number) from numbers(120e6);
-- peak:
-- - is 21MiB if background merges already scheduled
-- - is ~60MiB otherwise
set max_memory_usage='80Mi';
system start merges data_01641;
optimize table data_01641 final;
-- definitely should fail
set max_memory_usage='1Mi';
optimize table data_01641 final; -- { serverError 241 }
drop table data_01641;