mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-02 04:22:03 +00:00
Small fix
This commit is contained in:
parent
f722132f23
commit
99a26b3a9a
@ -68,7 +68,6 @@ void Lz4DeflatingWriteBuffer::nextImpl()
|
||||
out_capacity = out->buffer().end() - out->position();
|
||||
|
||||
/// write frame header and check for errors
|
||||
|
||||
size_t header_size = LZ4F_compressBegin(ctx, out_data, out_capacity, &kPrefs);
|
||||
|
||||
if (LZ4F_isError(header_size))
|
||||
@ -145,12 +144,14 @@ void Lz4DeflatingWriteBuffer::finishImpl()
|
||||
{
|
||||
next();
|
||||
|
||||
out_data = reinterpret_cast<void *>(out->position());
|
||||
out_capacity = out->buffer().end() - out->position();
|
||||
if (out_capacity < LZ4F_compressBound(0, &kPrefs))
|
||||
{
|
||||
out->next();
|
||||
out_capacity = out->buffer().end() - out->position();
|
||||
}
|
||||
|
||||
out_data = reinterpret_cast<void *>(out->position());
|
||||
|
||||
// LOG_FATAL(&Poco::Logger::root(), "Already leaving?");
|
||||
// if (out_capacity < LZ4F_compressBound(0, &kPrefs))
|
||||
// LOG_FATAL(&Poco::Logger::root(), "Ebal konya?");
|
||||
/// compression end
|
||||
size_t end_size = LZ4F_compressEnd(ctx, out_data, out_capacity, nullptr);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user