This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-1.2-lts by this push:
new bd54a049db0 [fix](compress) data decompress failed while max_len
equals 8M (#33456) (#33514)
bd54a049db0 is described below
commit bd54a049db03637c7946c254c1c82d5c27797f7f
Author: camby <[email protected]>
AuthorDate: Thu Apr 11 21:22:00 2024 +0800
[fix](compress) data decompress failed while max_len equals 8M (#33456)
(#33514)
* fix data decompress failed while max_len equals
MAX_COMPRESSION_BUFFER_SIZE_FOR_REUSE
* update code format error
---
be/src/util/block_compression.cpp | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/be/src/util/block_compression.cpp
b/be/src/util/block_compression.cpp
index 591d717d5be..b6c342bdec8 100644
--- a/be/src/util/block_compression.cpp
+++ b/be/src/util/block_compression.cpp
@@ -98,7 +98,7 @@ public:
compressed_buf.data = reinterpret_cast<char*>(output->data());
compressed_buf.size = max_len;
} else {
- // reuse context buffer if max_len <
MAX_COMPRESSION_BUFFER_FOR_REUSE
+ // reuse context buffer if max_len <=
MAX_COMPRESSION_BUFFER_FOR_REUSE
context->buffer.resize(max_len);
compressed_buf.data =
reinterpret_cast<char*>(context->buffer.data());
compressed_buf.size = max_len;
@@ -113,7 +113,7 @@ public:
compressed_buf.size);
}
output->resize(compressed_len);
- if (max_len < MAX_COMPRESSION_BUFFER_SIZE_FOR_REUSE) {
+ if (max_len <= MAX_COMPRESSION_BUFFER_SIZE_FOR_REUSE) {
output->assign_copy(reinterpret_cast<uint8_t*>(compressed_buf.data),
compressed_len);
}
return Status::OK();
@@ -237,7 +237,7 @@ private:
compressed_buf.data = reinterpret_cast<char*>(output->data());
compressed_buf.size = max_len;
} else {
- // reuse context buffer if max_len <
MAX_COMPRESSION_BUFFER_FOR_REUSE
+ // reuse context buffer if max_len <=
MAX_COMPRESSION_BUFFER_FOR_REUSE
context->buffer.resize(max_len);
compressed_buf.data =
reinterpret_cast<char*>(context->buffer.data());
compressed_buf.size = max_len;
@@ -271,7 +271,7 @@ private:
}
offset += wbytes;
output->resize(offset);
- if (max_len < MAX_COMPRESSION_BUFFER_SIZE_FOR_REUSE) {
+ if (max_len <= MAX_COMPRESSION_BUFFER_SIZE_FOR_REUSE) {
output->assign_copy(reinterpret_cast<uint8_t*>(compressed_buf.data), offset);
}
@@ -637,7 +637,7 @@ public:
compressed_buf.data = reinterpret_cast<char*>(output->data());
compressed_buf.size = max_len;
} else {
- // reuse context buffer if max_len <
MAX_COMPRESSION_BUFFER_FOR_REUSE
+ // reuse context buffer if max_len <=
MAX_COMPRESSION_BUFFER_FOR_REUSE
context->buffer.resize(max_len);
compressed_buf.data =
reinterpret_cast<char*>(context->buffer.data());
compressed_buf.size = max_len;
@@ -688,7 +688,7 @@ public:
// set compressed size for caller
output->resize(out_buf.pos);
- if (max_len < MAX_COMPRESSION_BUFFER_SIZE_FOR_REUSE) {
+ if (max_len <= MAX_COMPRESSION_BUFFER_SIZE_FOR_REUSE) {
output->assign_copy(reinterpret_cast<uint8_t*>(compressed_buf.data),
out_buf.pos);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]