diff --git a/be/src/util/block_compression.cpp b/be/src/util/block_compression.cpp index ccc7cc1e95..10f975451d 100644 --- a/be/src/util/block_compression.cpp +++ b/be/src/util/block_compression.cpp @@ -20,6 +20,8 @@ #include #include #include + +#include // Only used on x86 or x86_64 #if defined(__x86_64__) || defined(_M_X64) || defined(i386) || defined(__i386__) || \ defined(__i386) || defined(_M_IX86) @@ -895,6 +897,8 @@ public: if (max_len <= MAX_COMPRESSION_BUFFER_SIZE_FOR_REUSE) { output->assign_copy(reinterpret_cast(compressed_buf.data), out_buf.pos); } + } catch (std::exception e) { + return Status::InternalError("Fail to do ZSTD compress due to exception {}", e.what()); } catch (...) { // Do not set compress_failed to release context DCHECK(!compress_failed);