You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When clickhouse rise error when sending for column Array(FixedString(16)) memory is not freed. Note that this problem occurs only for not compressed connection and is correlated with #405
To Reproduce
#!/usr/bin/env python
from clickhouse_driver import Client
import tracemalloc
DATABASE = "***"
USER = "***"
PASSWORD = "***"
HOST = "***"
TABLE = "test_table"
DROP_TABLE_QUERY = f"""
DROP TABLE IF EXISTS `{DATABASE}`.{TABLE}
"""
CREATE_TABLE_QUERY = f"""
CREATE TABLE `{DATABASE}`.{TABLE}
(
`col1` Array(FixedString(16))
)
ENGINE = MergeTree
ORDER BY (col1)
"""
INSERT_QUERY = f"""
INSERT INTO `{DATABASE}`.{TABLE} (col1) VALUES
"""
tracemalloc.start()
data = [{"col1": [b'\r\xf7\x9c\xa1\xd7\xe4]\xee\x15\xeer["\xed^\xcc'] * 10000}] * 10000
try:
with Client(
host=HOST,
port=39000,
user=USER,
password=PASSWORD,
database=DATABASE,
# compression="zstd", # uncomment to spot the difference
) as client:
client.execute(DROP_TABLE_QUERY)
client.execute(CREATE_TABLE_QUERY)
client.execute(INSERT_QUERY, data)
except:
raise
finally:
print(
"Memory usage, Pick memory usage ",
tracemalloc.get_traced_memory()[0] / 1024 / 1024,
tracemalloc.get_traced_memory()[1] / 1024 / 1024,
)
Expected behavior
Memory should be freed regardless of error.
Versions
Versions
Verivifed for current master and 0.2.6
CH version: 23.3.2 (but is probably irrelevant)
Python 3.10.12
The text was updated successfully, but these errors were encountered:
Describe the bug
When clickhouse rise error when sending for column Array(FixedString(16)) memory is not freed. Note that this problem occurs only for not compressed connection and is correlated with #405
To Reproduce
Expected behavior
Memory should be freed regardless of error.
Versions
Versions
Verivifed for current master and 0.2.6
CH version: 23.3.2 (but is probably irrelevant)
Python 3.10.12
The text was updated successfully, but these errors were encountered: