Fix 02725_memory-for-merges

This commit is contained in:
Alexander Sapin 2023-07-19 12:35:52 +02:00
parent 0b27ac15f7
commit af6361e2a0

View File

@ -1,4 +1,4 @@
-- Tags: no-s3-storage
-- Tags: no-s3-storage, no-random-merge-tree-settings
-- We allocate a lot of memory for buffers when reading or writing to S3
DROP TABLE IF EXISTS 02725_memory_for_merges SYNC;
@ -21,7 +21,6 @@ OPTIMIZE TABLE 02725_memory_for_merges FINAL;
SYSTEM FLUSH LOGS;
WITH (SELECT uuid FROM system.tables WHERE table='02725_memory_for_merges' and database=currentDatabase()) as uuid
SELECT (sum(peak_memory_usage) < 1024 * 1024 * 200 AS x) ? x : sum(peak_memory_usage) from system.part_log where table_uuid=uuid and event_type='MergeParts';
SELECT (sum(peak_memory_usage) < 1024 * 1024 * 200 AS x) ? x : sum(peak_memory_usage) from system.part_log where database=currentDatabase() and table='02725_memory_for_merges' and event_type='MergeParts';
DROP TABLE IF EXISTS 02725_memory_for_merges SYNC;