This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new c8978fc9d17 [fix](HadoopLz4BlockCompression)Fixed the bug that
HadoopLz4BlockCompression creates _decompressor every time it
decompresses.(#37187) (#37299)
c8978fc9d17 is described below
commit c8978fc9d1738c4f04817b1f47d7747172b99a63
Author: daidai <[email protected]>
AuthorDate: Thu Jul 4 20:22:27 2024 +0800
[fix](HadoopLz4BlockCompression)Fixed the bug that
HadoopLz4BlockCompression creates _decompressor every time it
decompresses.(#37187) (#37299)
bp : #37187
---
be/src/util/block_compression.cpp | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/be/src/util/block_compression.cpp
b/be/src/util/block_compression.cpp
index 0f3dc8c556f..ccc7cc1e95d 100644
--- a/be/src/util/block_compression.cpp
+++ b/be/src/util/block_compression.cpp
@@ -25,6 +25,8 @@
defined(__i386) || defined(_M_IX86)
#include <libdeflate.h>
#endif
+#include <glog/log_severity.h>
+#include <glog/logging.h>
#include <limits.h>
#include <lz4/lz4.h>
#include <lz4/lz4frame.h>
@@ -213,12 +215,18 @@ private:
class HadoopLz4BlockCompression : public Lz4BlockCompression {
public:
+ HadoopLz4BlockCompression() {
+ Status st = Decompressor::create_decompressor(CompressType::LZ4BLOCK,
&_decompressor);
+ if (!st.ok()) {
+ LOG(FATAL) << "HadoopLz4BlockCompression construction failed.
status = " << st << "\n";
+ }
+ }
+
static HadoopLz4BlockCompression* instance() {
static HadoopLz4BlockCompression s_instance;
return &s_instance;
}
Status decompress(const Slice& input, Slice* output) override {
-
RETURN_IF_ERROR(Decompressor::create_decompressor(CompressType::LZ4BLOCK,
&_decompressor));
size_t input_bytes_read = 0;
size_t decompressed_len = 0;
size_t more_input_bytes = 0;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]