Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cherry-pick](branch-2.0) Pick "[Fix](LZ4 compression) Fix wrong LZ4 compression max input size limit (#41239)" #41504

Open
wants to merge 1 commit into
base: branch-2.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions be/src/util/block_compression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,13 @@ class Lz4BlockCompression : public BlockCompressionCodec {
}

Status compress(const Slice& input, faststring* output) override {
if (input.size > INT_MAX) {
if (input.size > LZ4_MAX_INPUT_SIZE) {
return Status::InvalidArgument(
"LZ4 not support those case(input.size>INT_MAX), maybe you should change "
"fragment_transmission_compression_codec to snappy, size={}",
input.size);
"LZ4 not support those case(input.size>LZ4_MAX_INPUT_SIZE), maybe you should "
"change "
"fragment_transmission_compression_codec to snappy, input.size={}, "
"LZ4_MAX_INPUT_SIZE={}",
input.size, LZ4_MAX_INPUT_SIZE);
}

Context* context;
Expand Down
Loading