-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Memory is not returned when ENGINE=Memory table is dropped #9248
Copy link
Copy link
Closed
Labels
memoryWhen memory usage is higher than expectedWhen memory usage is higher than expected
Description
Describe the bug or unexpected behaviour
Memory is not returned when a table with ENGINE=Memory is dropped!
How to reproduce
- ClickHouse server version 20.+
- Running the following snippet will waste around 4Gb of RAM
CREATE DATABASE IF NOT EXISTS test_memory_leak
CREATE TABLE test_memory_leak.table1 (x1 UInt8) ENGINE = Memory
INSERT INTO test_memory_leak.table1 SELECT materialize(0) AS x1 FROM numbers(4000000000)
SELECT 1
TRUNCATE TABLE test_memory_leak.table1
DROP TABLE test_memory_leak.table1
DROP DATABASE test_memory_leak
- Running it in a loop eventually gets ClickHouse server OOMed
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
memoryWhen memory usage is higher than expectedWhen memory usage is higher than expected