This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new 1aced46322b [fix](compress) data decompress failed while max_len
equals 8M (#33456) (#33513)
1aced46322b is described below
commit 1aced46322bd3628db430e8298b2cb784156a48a
Author: camby <[email protected]>
AuthorDate: Thu Apr 11 21:21:45 2024 +0800
[fix](compress) data decompress failed while max_len equals 8M (#33456)
(#33513)
* fix data decompress failed while max_len equals
MAX_COMPRESSION_BUFFER_SIZE_FOR_REUSE
* update code format error
---
be/src/util/block_compression.cpp | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/be/src/util/block_compression.cpp
b/be/src/util/block_compression.cpp
index b7e93dbeb53..65b8377b296 100644
--- a/be/src/util/block_compression.cpp
+++ b/be/src/util/block_compression.cpp
@@ -133,7 +133,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;
@@ -148,7 +148,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();
@@ -297,7 +297,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;
@@ -331,7 +331,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);
}
@@ -492,7 +492,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;
@@ -506,7 +506,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();
@@ -805,7 +805,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;
@@ -856,7 +856,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]