master merge adjustments

This commit is contained in:
Yakov Olkhovskiy 2024-01-10 16:55:09 +00:00
parent 2e124b19b8
commit 45d5e29ba0
5 changed files with 9 additions and 6 deletions

View File

@ -207,6 +207,7 @@ std::unique_ptr<WriteBuffer> wrapWriteBufferWithCompressionMethod(
std::unique_ptr<WriteBuffer> nested,
CompressionMethod method,
int level,
int zstd_window_log,
size_t buf_size,
char * existing_memory,
size_t alignment,
@ -214,7 +215,7 @@ std::unique_ptr<WriteBuffer> wrapWriteBufferWithCompressionMethod(
{
if (method == CompressionMethod::None)
return nested;
return createWriteCompressedWrapper(nested, method, level, buf_size, existing_memory, alignment, compress_empty);
return createWriteCompressedWrapper(nested, method, level, zstd_window_log, buf_size, existing_memory, alignment, compress_empty);
}
@ -222,13 +223,14 @@ std::unique_ptr<WriteBuffer> wrapWriteBufferWithCompressionMethod(
WriteBuffer * nested,
CompressionMethod method,
int level,
int zstd_window_log,
size_t buf_size,
char * existing_memory,
size_t alignment,
bool compress_empty)
{
assert(method != CompressionMethod::None);
return createWriteCompressedWrapper(nested, method, level, buf_size, existing_memory, alignment, compress_empty);
return createWriteCompressedWrapper(nested, method, level, zstd_window_log, buf_size, existing_memory, alignment, compress_empty);
}
}

View File

@ -75,6 +75,7 @@ std::unique_ptr<WriteBuffer> wrapWriteBufferWithCompressionMethod(
WriteBuffer * nested,
CompressionMethod method,
int level,
int zstd_window_log,
size_t buf_size = DBMS_DEFAULT_BUFFER_SIZE,
char * existing_memory = nullptr,
size_t alignment = 0,

View File

@ -21,7 +21,7 @@ static void setZstdParameter(ZSTD_CCtx * cctx, ZSTD_cParameter param, int value)
ZSTD_VERSION_STRING);
}
void ZstdDeflatingWriteBuffer::initialize(int compression_level)
void ZstdDeflatingWriteBuffer::initialize(int compression_level, int window_log)
{
cctx = ZSTD_createCCtx();
if (cctx == nullptr)

View File

@ -25,7 +25,7 @@ public:
bool compress_empty_ = true)
: WriteBufferWithOwnMemoryDecorator(std::move(out_), buf_size, existing_memory, alignment), compress_empty(compress_empty_)
{
initialize(compression_level);
initialize(compression_level, window_log);
}
~ZstdDeflatingWriteBuffer() override;
@ -36,7 +36,7 @@ public:
}
private:
void initialize(int compression_level);
void initialize(int compression_level, int window_log);
void nextImpl() override;

View File

@ -642,7 +642,7 @@ void HTTPHandler::processQuery(
used_output.out_holder.get(),
http_response_compression_method,
static_cast<int>(http_zlib_compression_level),
DBMS_DEFAULT_BUFFER_SIZE, nullptr, 0, false);
0, DBMS_DEFAULT_BUFFER_SIZE, nullptr, 0, false);
used_output.out = used_output.wrap_compressed_holder;
}