mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 00:52:02 +00:00
Merge pull request #33840 from azat/keeper-zstd-fix-leak
keeper: fix memory leak in case of compression is used (default)
This commit is contained in:
commit
25547dee91
@ -84,6 +84,8 @@ void ZstdDeflatingAppendableWriteBuffer::finalizeImpl()
|
||||
{
|
||||
if (first_write)
|
||||
{
|
||||
/// To free cctx
|
||||
finalizeZstd();
|
||||
/// Nothing was written
|
||||
return;
|
||||
}
|
||||
@ -117,6 +119,11 @@ void ZstdDeflatingAppendableWriteBuffer::finalizeBefore()
|
||||
}
|
||||
|
||||
void ZstdDeflatingAppendableWriteBuffer::finalizeAfter()
|
||||
{
|
||||
finalizeZstd();
|
||||
}
|
||||
|
||||
void ZstdDeflatingAppendableWriteBuffer::finalizeZstd()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -52,6 +52,7 @@ private:
|
||||
void finalizeImpl() override;
|
||||
void finalizeBefore() override;
|
||||
void finalizeAfter() override;
|
||||
void finalizeZstd();
|
||||
/// Adding zstd empty block to out.working_buffer
|
||||
void addEmptyBlock();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user