mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-23 02:00:49 +00:00
keeper: fix memory leak in case of compression is used (default)
In case of compression is used, ZstdDeflatingAppendableWriteBuffer is used, but it has a leak, since it frees ZSTD_CCtx only if there was write while this is not correct, since it is created anyway. This was found with jemalloc profile, keeper-bench and the following keeper settings: - force_sync=false - snapshot_distance=100 - reserved_log_items=0 - rotate_log_storage_interval=100 Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
parent
9f6f84259d
commit
d021190b8c
@ -84,6 +84,8 @@ void ZstdDeflatingAppendableWriteBuffer::finalizeImpl()
|
||||
{
|
||||
if (first_write)
|
||||
{
|
||||
/// To free cctx
|
||||
finalizeAfter();
|
||||
/// Nothing was written
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user