diff --git a/be/src/common/status.h b/be/src/common/status.h index 0252ec8564feeb..d059f289402cea 100644 --- a/be/src/common/status.h +++ b/be/src/common/status.h @@ -293,8 +293,7 @@ namespace ErrorCode { E(ENTRY_NOT_FOUND, -7002, false); \ E(INVALID_TABLET_STATE, -7211, false); \ E(ROWSETS_EXPIRED, -7311, false); \ - E(CGROUP_ERROR, -7411, false); \ - E(FATAL_ERROR, -7412, false); + E(CGROUP_ERROR, -7411, false); // Define constexpr int error_code_name = error_code_value #define M(NAME, ERRORCODE, ENABLESTACKTRACE) constexpr int NAME = ERRORCODE; @@ -447,14 +446,6 @@ class [[nodiscard]] Status { static Status OK() { return {}; } - template - static Status FatalError(std::string_view msg, Args&&... args) { -#ifndef NDEBUG - LOG(FATAL) << fmt::format(msg, std::forward(args)...); -#endif - return Error(msg, std::forward(args)...); - } - // default have stacktrace. could disable manually. #define ERROR_CTOR(name, code) \ template \ diff --git a/be/src/gutil/strings/escaping.cc b/be/src/gutil/strings/escaping.cc index c6ba8e2f9c375e..2ff59104f6d5ce 100644 --- a/be/src/gutil/strings/escaping.cc +++ b/be/src/gutil/strings/escaping.cc @@ -10,8 +10,6 @@ #include #include -#include "common/exception.h" - using std::numeric_limits; #include @@ -1086,8 +1084,7 @@ int Base64UnescapeInternal(const char* src, int szsrc, char* dest, int szdest, default: // state should have no other values at this point. - throw doris::Exception( - doris::Status::FatalError("This can't happen; base64 decoder state = {}", state)); + LOG(FATAL) << "This can't happen; base64 decoder state = " << state; } // The remainder of the string should be all whitespace, mixed with diff --git a/be/src/gutil/strings/numbers.cc b/be/src/gutil/strings/numbers.cc index f044ea08d31551..f471bf31bd08bb 100644 --- a/be/src/gutil/strings/numbers.cc +++ b/be/src/gutil/strings/numbers.cc @@ -19,8 +19,6 @@ #include #include -#include "common/exception.h" - using std::numeric_limits; #include @@ -774,8 +772,8 @@ uint64 atoi_kmgt(const char* s) { scale = GG_ULONGLONG(1) << 40; break; default: - throw doris::Exception(doris::Status::FatalError( - "Invalid mnemonic: `{}'; should be one of `K', `M', `G', and `T'.", c)); + LOG(FATAL) << "Invalid mnemonic: `" << c << "';" + << " should be one of `K', `M', `G', and `T'."; } } return n * scale; diff --git a/be/src/gutil/strings/util.cc b/be/src/gutil/strings/util.cc index 37c09d63b24fff..80d5d463430c77 100644 --- a/be/src/gutil/strings/util.cc +++ b/be/src/gutil/strings/util.cc @@ -19,8 +19,6 @@ #include #include -#include "common/exception.h" - using std::copy; using std::max; using std::min; @@ -491,7 +489,8 @@ const char* strstr_delimited(const char* haystack, const char* needle, char deli ++haystack; } } - throw doris::Exception(doris::Status::FatalError("Unreachable statement")); + LOG(FATAL) << "Unreachable statement"; + return nullptr; } // ---------------------------------------------------------------------- diff --git a/be/src/gutil/threading/thread_collision_warner.cc b/be/src/gutil/threading/thread_collision_warner.cc index fd51a9195d629e..d2f1e47f8e02d9 100644 --- a/be/src/gutil/threading/thread_collision_warner.cc +++ b/be/src/gutil/threading/thread_collision_warner.cc @@ -4,9 +4,6 @@ #include "gutil/threading/thread_collision_warner.h" -#include "common/exception.h" -#include "common/status.h" - #ifdef __linux__ #include #else @@ -22,9 +19,8 @@ namespace base { void DCheckAsserter::warn(int64_t previous_thread_id, int64_t current_thread_id) { - throw doris::Exception(doris::Status::FatalError( - "Thread Collision! Previous thread id: {}, current thread id: {}", previous_thread_id, - current_thread_id)); + LOG(FATAL) << "Thread Collision! Previous thread id: " << previous_thread_id + << ", current thread id: " << current_thread_id; } static subtle::Atomic64 CurrentThread() { diff --git a/be/src/io/file_factory.h b/be/src/io/file_factory.h index afa54e221664c9..9d9d714812ffe9 100644 --- a/be/src/io/file_factory.h +++ b/be/src/io/file_factory.h @@ -118,9 +118,10 @@ class FileFactory { case TStorageBackendType::HDFS: return TFileType::FILE_HDFS; default: - throw Exception(Status::FatalError("not match type to convert, from type:{}", type)); + LOG(FATAL) << "not match type to convert, from type:" << type; } - throw Exception(Status::FatalError("__builtin_unreachable")); + LOG(FATAL) << "__builtin_unreachable"; + __builtin_unreachable(); } }; diff --git a/be/src/olap/block_column_predicate.h b/be/src/olap/block_column_predicate.h index b6ff115c34c72d..eed5e18329acf7 100644 --- a/be/src/olap/block_column_predicate.h +++ b/be/src/olap/block_column_predicate.h @@ -74,21 +74,25 @@ class BlockColumnPredicate { } virtual bool can_do_apply_safely(PrimitiveType input_type, bool is_null) const { - throw Exception(Status::FatalError("should not reach here")); + LOG(FATAL) << "should not reach here"; + return true; } virtual bool support_zonemap() const { return true; } virtual bool evaluate_and(const std::pair& statistic) const { - throw Exception(Status::FatalError("should not reach here")); + LOG(FATAL) << "should not reach here"; + return true; } virtual bool evaluate_and(const segment_v2::BloomFilter* bf) const { - throw Exception(Status::FatalError("should not reach here")); + LOG(FATAL) << "should not reach here"; + return true; } virtual bool evaluate_and(const StringRef* dict_words, const size_t dict_num) const { - throw Exception(Status::FatalError("should not reach here")); + LOG(FATAL) << "should not reach here"; + return true; } virtual bool can_do_bloom_filter(bool ngram) const { return false; } diff --git a/be/src/olap/data_dir.cpp b/be/src/olap/data_dir.cpp index 4aa215e0c2eb16..4070bd1dd4340e 100644 --- a/be/src/olap/data_dir.cpp +++ b/be/src/olap/data_dir.cpp @@ -316,10 +316,10 @@ Status DataDir::_check_incompatible_old_format_tablet() { std::string_view value) -> bool { // if strict check incompatible old format, then log fatal if (config::storage_strict_check_incompatible_old_format) { - throw Exception(Status::FatalError( - "There are incompatible old format metas, current version does not support and " - "it may lead to data missing!!! tablet_id = {} schema_hash = {}", - tablet_id, schema_hash)); + LOG(FATAL) + << "There are incompatible old format metas, current version does not support " + << "and it may lead to data missing!!! " + << "tablet_id = " << tablet_id << " schema_hash = " << schema_hash; } else { LOG(WARNING) << "There are incompatible old format metas, current version does not support " @@ -451,8 +451,7 @@ Status DataDir::load() { << ", loaded tablet: " << tablet_ids.size() << ", error tablet: " << failed_tablet_ids.size() << ", path: " << _path; if (!config::ignore_load_tablet_failure) { - throw Exception(Status::FatalError( - "load tablets encounter failure. stop BE process. path: {}", _path)); + LOG(FATAL) << "load tablets encounter failure. stop BE process. path: " << _path; } } if (!load_tablet_status) { @@ -496,9 +495,10 @@ Status DataDir::load() { } } if (rowset_partition_id_eq_0_num > config::ignore_invalid_partition_id_rowset_num) { - throw Exception(Status::FatalError( + LOG(FATAL) << fmt::format( "roswet partition id eq 0 is {} bigger than config {}, be exit, plz check be.INFO", - rowset_partition_id_eq_0_num, config::ignore_invalid_partition_id_rowset_num)); + rowset_partition_id_eq_0_num, config::ignore_invalid_partition_id_rowset_num); + exit(-1); } // traverse rowset diff --git a/be/src/olap/key_coder.h b/be/src/olap/key_coder.h index 549ac53656b647..6885a0d96f251b 100644 --- a/be/src/olap/key_coder.h +++ b/be/src/olap/key_coder.h @@ -109,8 +109,8 @@ class KeyCoderTraits< case 16: return BigEndian::FromHost128(val); default: - throw Exception(Status::FatalError("Invalid type to big endian, type={}, size={}", - int(field_type), sizeof(UnsignedCppType))); + LOG(FATAL) << "Invalid type to big endian, type=" << int(field_type) + << ", size=" << sizeof(UnsignedCppType); } } } @@ -300,7 +300,8 @@ class KeyCoderTraits { } static Status decode_ascending(Slice* encoded_key, size_t index_size, uint8_t* cell_ptr) { - throw Exception(Status::FatalError("decode_ascending is not implemented")); + LOG(FATAL) << "decode_ascending is not implemented"; + return Status::OK(); } }; @@ -319,7 +320,8 @@ class KeyCoderTraits { } static Status decode_ascending(Slice* encoded_key, size_t index_size, uint8_t* cell_ptr) { - throw Exception(Status::FatalError("decode_ascending is not implemented")); + LOG(FATAL) << "decode_ascending is not implemented"; + return Status::OK(); } }; @@ -338,7 +340,8 @@ class KeyCoderTraits { } static Status decode_ascending(Slice* encoded_key, size_t index_size, uint8_t* cell_ptr) { - throw Exception(Status::FatalError("decode_ascending is not implemented")); + LOG(FATAL) << "decode_ascending is not implemented"; + return Status::OK(); } }; diff --git a/be/src/olap/like_column_predicate.h b/be/src/olap/like_column_predicate.h index e0d185c7bd3e98..31763d45f7edc7 100644 --- a/be/src/olap/like_column_predicate.h +++ b/be/src/olap/like_column_predicate.h @@ -128,8 +128,8 @@ class LikeColumnPredicate : public ColumnPredicate { } } } else { - throw Exception(Status::FatalError( - "vectorized (not) like predicates should be dict column")); + LOG(FATAL) << "vectorized (not) like predicates should be dict column"; + __builtin_unreachable(); } } else { if (column.is_column_dictionary()) { @@ -153,8 +153,8 @@ class LikeColumnPredicate : public ColumnPredicate { } } } else { - throw Exception(Status::FatalError( - "vectorized (not) like predicates should be dict column")); + LOG(FATAL) << "vectorized (not) like predicates should be dict column"; + __builtin_unreachable(); } } } diff --git a/be/src/olap/match_predicate.h b/be/src/olap/match_predicate.h index 3ff1775fd8882a..ad202b7b2427cf 100644 --- a/be/src/olap/match_predicate.h +++ b/be/src/olap/match_predicate.h @@ -55,7 +55,8 @@ class MatchPredicate : public ColumnPredicate { //evaluate predicate on Bitmap Status evaluate(BitmapIndexIterator* iterator, uint32_t num_rows, roaring::Roaring* roaring) const override { - throw Exception(Status::FatalError("Not Implemented MatchPredicate::evaluate")); + LOG(FATAL) << "Not Implemented MatchPredicate::evaluate"; + __builtin_unreachable(); } //evaluate predicate on inverted diff --git a/be/src/olap/null_predicate.h b/be/src/olap/null_predicate.h index 8e3fef1ff27695..59480264b46103 100644 --- a/be/src/olap/null_predicate.h +++ b/be/src/olap/null_predicate.h @@ -87,8 +87,8 @@ class NullPredicate : public ColumnPredicate { if (_is_null) { return bf->test_bytes(nullptr, 0); } else { - throw Exception(Status::FatalError( - "Bloom filter is not supported by predicate type: is_null=")); + LOG(FATAL) << "Bloom filter is not supported by predicate type: is_null=" << _is_null; + return true; } } diff --git a/be/src/olap/olap_common.h b/be/src/olap/olap_common.h index 3b892e5d360e54..11249bafb1e3c0 100644 --- a/be/src/olap/olap_common.h +++ b/be/src/olap/olap_common.h @@ -36,7 +36,6 @@ #include #include "common/config.h" -#include "common/exception.h" #include "io/io_common.h" #include "olap/olap_define.h" #include "olap/rowset/rowset_fwd.h" @@ -420,8 +419,7 @@ struct RowsetId { LOG(WARNING) << "failed to init rowset id: " << rowset_id_str; high = next_rowset_id().hi; } else { - throw Exception( - Status::FatalError("failed to init rowset id: {}", rowset_id_str)); + LOG(FATAL) << "failed to init rowset id: " << rowset_id_str; } } init(1, high, 0, 0); @@ -442,7 +440,7 @@ struct RowsetId { void init(int64_t id_version, int64_t high, int64_t middle, int64_t low) { version = id_version; if (UNLIKELY(high >= MAX_ROWSET_ID)) { - throw Exception(Status::FatalError("inc rowsetid is too large:{}", high)); + LOG(FATAL) << "inc rowsetid is too large:" << high; } hi = (id_version << 56) + (high & LOW_56_BITS); mi = middle; diff --git a/be/src/olap/page_cache.h b/be/src/olap/page_cache.h index db1a6808345525..32b6683e7823b0 100644 --- a/be/src/olap/page_cache.h +++ b/be/src/olap/page_cache.h @@ -176,9 +176,11 @@ class StoragePageCache { return _pk_index_page_cache.get(); } default: - throw Exception(Status::FatalError("get error type page cache")); + LOG(FATAL) << "get error type page cache"; + __builtin_unreachable(); } - throw Exception(Status::FatalError("__builtin_unreachable")); + LOG(FATAL) << "__builtin_unreachable"; + __builtin_unreachable(); } }; diff --git a/be/src/olap/rowset/beta_rowset_writer_v2.h b/be/src/olap/rowset/beta_rowset_writer_v2.h index 9040003a68d0d8..78ec4a7dce703c 100644 --- a/be/src/olap/rowset/beta_rowset_writer_v2.h +++ b/be/src/olap/rowset/beta_rowset_writer_v2.h @@ -99,7 +99,8 @@ class BetaRowsetWriterV2 : public RowsetWriter { }; RowsetSharedPtr manual_build(const RowsetMetaSharedPtr& rowset_meta) override { - throw Exception(Status::FatalError("not implemeted")); + LOG(FATAL) << "not implemeted"; + return nullptr; } PUniqueId load_id() override { return _context.load_id; } diff --git a/be/src/olap/rowset/rowset_writer.h b/be/src/olap/rowset/rowset_writer.h index 0a0d36ea04a661..f84ff964ea3051 100644 --- a/be/src/olap/rowset/rowset_writer.h +++ b/be/src/olap/rowset/rowset_writer.h @@ -170,9 +170,7 @@ class RowsetWriter { virtual int32_t allocate_segment_id() = 0; - virtual void set_segment_start_id(int num_segment) { - throw Exception(Status::FatalError("not supported!")); - } + virtual void set_segment_start_id(int num_segment) { LOG(FATAL) << "not supported!"; } virtual int64_t delete_bitmap_ns() { return 0; } diff --git a/be/src/olap/rowset/segment_v2/hierarchical_data_reader.cpp b/be/src/olap/rowset/segment_v2/hierarchical_data_reader.cpp index fe7167e9444a76..db6bac6b8b4c09 100644 --- a/be/src/olap/rowset/segment_v2/hierarchical_data_reader.cpp +++ b/be/src/olap/rowset/segment_v2/hierarchical_data_reader.cpp @@ -80,7 +80,8 @@ Status HierarchicalDataReader::init(const ColumnIteratorOptions& opts) { } Status HierarchicalDataReader::seek_to_first() { - throw Exception(Status::FatalError("Not implemented")); + LOG(FATAL) << "Not implemented"; + __builtin_unreachable(); } Status HierarchicalDataReader::seek_to_ordinal(ordinal_t ord) { @@ -158,7 +159,8 @@ Status ExtractReader::init(const ColumnIteratorOptions& opts) { } Status ExtractReader::seek_to_first() { - throw Exception(Status::FatalError("Not implemented")); + LOG(FATAL) << "Not implemented"; + __builtin_unreachable(); } Status ExtractReader::seek_to_ordinal(ordinal_t ord) { diff --git a/be/src/olap/storage_policy.cpp b/be/src/olap/storage_policy.cpp index 3b4a1f1a185678..837e9bed178e3a 100644 --- a/be/src/olap/storage_policy.cpp +++ b/be/src/olap/storage_policy.cpp @@ -141,10 +141,8 @@ std::vector> get_storage_resource_ids() { namespace { [[noreturn]] void exit_at_unknown_path_version(std::string_view resource_id, int64_t path_version) { - throw Exception( - Status::FatalError("unknown path version, please upgrade BE or drop this storage " - "vault. resource_id={} path_version={}", - resource_id, path_version)); + LOG(FATAL) << "unknown path version, please upgrade BE or drop this storage vault. resource_id=" + << resource_id << " path_version=" << path_version; } } // namespace diff --git a/be/src/olap/tablet_reader.cpp b/be/src/olap/tablet_reader.cpp index 17cab2a3c0c834..a83e0bfdbf4c30 100644 --- a/be/src/olap/tablet_reader.cpp +++ b/be/src/olap/tablet_reader.cpp @@ -61,7 +61,7 @@ using namespace ErrorCode; void TabletReader::ReaderParams::check_validation() const { if (UNLIKELY(version.first == -1 && is_segcompaction == false)) { - throw Exception(Status::FatalError("version is not set. tablet={}", tablet->tablet_id())); + LOG(FATAL) << "version is not set. tablet=" << tablet->tablet_id(); } } diff --git a/be/src/pipeline/dependency.h b/be/src/pipeline/dependency.h index ecbd49a5647c2e..f1cfe2b02977e1 100644 --- a/be/src/pipeline/dependency.h +++ b/be/src/pipeline/dependency.h @@ -723,7 +723,8 @@ inline std::string get_exchange_type_name(ExchangeType idx) { case ExchangeType::LOCAL_MERGE_SORT: return "LOCAL_MERGE_SORT"; } - throw Exception(Status::FatalError("__builtin_unreachable")); + LOG(FATAL) << "__builtin_unreachable"; + __builtin_unreachable(); } struct DataDistribution { diff --git a/be/src/pipeline/exec/exchange_sink_buffer.cpp b/be/src/pipeline/exec/exchange_sink_buffer.cpp index 800ef6150738d6..e3f895444d4168 100644 --- a/be/src/pipeline/exec/exchange_sink_buffer.cpp +++ b/be/src/pipeline/exec/exchange_sink_buffer.cpp @@ -422,7 +422,8 @@ void ExchangeSinkBuffer::_ended(InstanceLoId id) { } LOG(INFO) << ss.str(); - throw Exception(Status::FatalError("not find the instance id")); + LOG(FATAL) << "not find the instance id"; + __builtin_unreachable(); } else { std::unique_lock lock(*_instance_to_package_queue_mutex[id]); _running_sink_count[id]--; diff --git a/be/src/pipeline/exec/exchange_sink_buffer.h b/be/src/pipeline/exec/exchange_sink_buffer.h index a381c5aff144f3..458c7c3f66e3ee 100644 --- a/be/src/pipeline/exec/exchange_sink_buffer.h +++ b/be/src/pipeline/exec/exchange_sink_buffer.h @@ -155,9 +155,10 @@ class ExchangeSendCallback : public ::doris::DummyBrpcCallback { start_rpc_time); } } catch (const std::exception& exp) { - throw Exception(Status::FatalError("brpc callback error: {}", exp.what())); + LOG(FATAL) << "brpc callback error: " << exp.what(); } catch (...) { - throw Exception(Status::FatalError("brpc callback error.")); + LOG(FATAL) << "brpc callback error."; + __builtin_unreachable(); } } int64_t start_rpc_time; diff --git a/be/src/pipeline/exec/hashjoin_build_sink.cpp b/be/src/pipeline/exec/hashjoin_build_sink.cpp index 47560875b51252..19e8493e596a7e 100644 --- a/be/src/pipeline/exec/hashjoin_build_sink.cpp +++ b/be/src/pipeline/exec/hashjoin_build_sink.cpp @@ -303,7 +303,9 @@ Status HashJoinBuildSinkLocalState::process_build_block(RuntimeState* state, [&](std::monostate& arg, auto join_op, auto short_circuit_for_null_in_build_side, auto with_other_conjuncts) -> Status { - throw Exception(Status::FatalError("FATAL: uninited hash table")); + LOG(FATAL) << "FATAL: uninited hash table"; + __builtin_unreachable(); + return Status::OK(); }, [&](auto&& arg, auto&& join_op, auto short_circuit_for_null_in_build_side, auto with_other_conjuncts) -> Status { diff --git a/be/src/pipeline/exec/operator.cpp b/be/src/pipeline/exec/operator.cpp index bb254aae72b8a7..f6664e147a3dab 100644 --- a/be/src/pipeline/exec/operator.cpp +++ b/be/src/pipeline/exec/operator.cpp @@ -414,7 +414,8 @@ std::shared_ptr DataSinkOperatorX::create_shar return nullptr; } else if constexpr (std::is_same_v) { - throw Exception(Status::FatalError("should not reach here!")); + LOG(FATAL) << "should not reach here!"; + return nullptr; } else { auto ss = LocalStateType::SharedStateType::create_shared(); ss->id = operator_id(); diff --git a/be/src/pipeline/exec/operator.h b/be/src/pipeline/exec/operator.h index df6e9c913b6b4c..a2c8e110cedac3 100644 --- a/be/src/pipeline/exec/operator.h +++ b/be/src/pipeline/exec/operator.h @@ -632,10 +632,12 @@ class OperatorXBase : public OperatorBase { _limit(-1) {} virtual Status init(const TPlanNode& tnode, RuntimeState* state); Status init(const TDataSink& tsink) override { - throw Exception(Status::FatalError("should not reach here!")); + LOG(FATAL) << "should not reach here!"; + return Status::OK(); } virtual Status init(ExchangeType type) { - throw Exception(Status::FatalError("should not reach here!")); + LOG(FATAL) << "should not reach here!"; + return Status::OK(); } [[noreturn]] virtual const std::vector& runtime_filter_descs() { throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, _op_name); diff --git a/be/src/runtime/exec_env_init.cpp b/be/src/runtime/exec_env_init.cpp index 2d7554e702969f..a371cdb947ff56 100644 --- a/be/src/runtime/exec_env_init.cpp +++ b/be/src/runtime/exec_env_init.cpp @@ -421,9 +421,9 @@ void ExecEnv::init_file_cache_factory(std::vector& cache_paths std::unordered_set cache_path_set; Status rest = doris::parse_conf_cache_paths(doris::config::file_cache_path, cache_paths); if (!rest) { - throw Exception( - Status::FatalError("parse config file cache path failed, path={}, reason={}", - doris::config::file_cache_path, rest.msg())); + LOG(FATAL) << "parse config file cache path failed, path=" << doris::config::file_cache_path + << ", reason=" << rest.msg(); + exit(-1); } doris::Status cache_status; @@ -437,8 +437,8 @@ void ExecEnv::init_file_cache_factory(std::vector& cache_paths cache_path.path, cache_path.init_settings()); if (!cache_status.ok()) { if (!doris::config::ignore_broken_disk) { - throw Exception( - Status::FatalError("failed to init file cache, err: {}", cache_status)); + LOG(FATAL) << "failed to init file cache, err: " << cache_status; + exit(-1); } LOG(WARNING) << "failed to init file cache, err: " << cache_status; } diff --git a/be/src/runtime/jsonb_value.h b/be/src/runtime/jsonb_value.h index 5f530db1ac8117..65f4927759c304 100644 --- a/be/src/runtime/jsonb_value.h +++ b/be/src/runtime/jsonb_value.h @@ -61,47 +61,58 @@ struct JsonBinaryValue { } bool operator==(const JsonBinaryValue& other) const { - throw Exception(Status::FatalError("comparing between JsonBinaryValue is not supported")); + LOG(FATAL) << "comparing between JsonBinaryValue is not supported"; + __builtin_unreachable(); } // != bool ne(const JsonBinaryValue& other) const { - throw Exception(Status::FatalError("comparing between JsonBinaryValue is not supported")); + LOG(FATAL) << "comparing between JsonBinaryValue is not supported"; + __builtin_unreachable(); } // <= bool le(const JsonBinaryValue& other) const { - throw Exception(Status::FatalError("comparing between JsonBinaryValue is not supported")); + LOG(FATAL) << "comparing between JsonBinaryValue is not supported"; + __builtin_unreachable(); } // >= bool ge(const JsonBinaryValue& other) const { - throw Exception(Status::FatalError("comparing between JsonBinaryValue is not supported")); + LOG(FATAL) << "comparing between JsonBinaryValue is not supported"; + __builtin_unreachable(); } // < bool lt(const JsonBinaryValue& other) const { - throw Exception(Status::FatalError("comparing between JsonBinaryValue is not supported")); + LOG(FATAL) << "comparing between JsonBinaryValue is not supported"; + __builtin_unreachable(); } // > bool gt(const JsonBinaryValue& other) const { - throw Exception(Status::FatalError("comparing between JsonBinaryValue is not supported")); + LOG(FATAL) << "comparing between JsonBinaryValue is not supported"; + __builtin_unreachable(); } bool operator!=(const JsonBinaryValue& other) const { - throw Exception(Status::FatalError("comparing between JsonBinaryValue is not supported")); + LOG(FATAL) << "comparing between JsonBinaryValue is not supported"; + __builtin_unreachable(); } bool operator<=(const JsonBinaryValue& other) const { - throw Exception(Status::FatalError("comparing between JsonBinaryValue is not supported")); + LOG(FATAL) << "comparing between JsonBinaryValue is not supported"; + __builtin_unreachable(); } bool operator>=(const JsonBinaryValue& other) const { - throw Exception(Status::FatalError("comparing between JsonBinaryValue is not supported")); + LOG(FATAL) << "comparing between JsonBinaryValue is not supported"; + __builtin_unreachable(); } bool operator<(const JsonBinaryValue& other) const { - throw Exception(Status::FatalError("comparing between JsonBinaryValue is not supported")); + LOG(FATAL) << "comparing between JsonBinaryValue is not supported"; + __builtin_unreachable(); } bool operator>(const JsonBinaryValue& other) const { - throw Exception(Status::FatalError("comparing between JsonBinaryValue is not supported")); + LOG(FATAL) << "comparing between JsonBinaryValue is not supported"; + __builtin_unreachable(); } Status from_json_string(const char* s, size_t len); diff --git a/be/src/runtime/memory/cache_manager.h b/be/src/runtime/memory/cache_manager.h index 1e89e957ba1ce6..a2a089b929dbdf 100644 --- a/be/src/runtime/memory/cache_manager.h +++ b/be/src/runtime/memory/cache_manager.h @@ -40,8 +40,7 @@ class CacheManager { #ifdef BE_TEST _caches.erase(it); #else - throw Exception(Status::FatalError("Repeat register cache {}", - CachePolicy::type_string(cache->type()))); + LOG(FATAL) << "Repeat register cache " << CachePolicy::type_string(cache->type()); #endif // BE_TEST } _caches.insert({cache->type(), cache}); diff --git a/be/src/runtime/memory/cache_policy.h b/be/src/runtime/memory/cache_policy.h index 72e61fed2e0013..8f077a4eb45bb1 100644 --- a/be/src/runtime/memory/cache_policy.h +++ b/be/src/runtime/memory/cache_policy.h @@ -99,10 +99,10 @@ class CachePolicy { case CacheType::TABLET_COLUMN_OBJECT_POOL: return "TabletColumnObjectPool"; default: - throw Exception(Status::FatalError("not match type of cache policy :{}", - static_cast(type))); + LOG(FATAL) << "not match type of cache policy :" << static_cast(type); } - throw Exception(Status::FatalError("__builtin_unreachable")); + LOG(FATAL) << "__builtin_unreachable"; + __builtin_unreachable(); } inline static std::unordered_map StringToType = { diff --git a/be/src/runtime/memory/lru_cache_policy.h b/be/src/runtime/memory/lru_cache_policy.h index d4c282dab8274e..3fdb43facd7715 100644 --- a/be/src/runtime/memory/lru_cache_policy.h +++ b/be/src/runtime/memory/lru_cache_policy.h @@ -90,8 +90,7 @@ class LRUCachePolicy : public CachePolicy { case LRUCacheType::NUMBER: return "number"; default: - throw Exception( - Status::FatalError("not match type of lru cache:{}", static_cast(type))); + LOG(FATAL) << "not match type of lru cache:" << static_cast(type); } } diff --git a/be/src/runtime/memory/thread_mem_tracker_mgr.h b/be/src/runtime/memory/thread_mem_tracker_mgr.h index 9dbf4399492d02..db3b32a6298820 100644 --- a/be/src/runtime/memory/thread_mem_tracker_mgr.h +++ b/be/src/runtime/memory/thread_mem_tracker_mgr.h @@ -246,13 +246,13 @@ inline void ThreadMemTrackerMgr::consume(int64_t size, int skip_large_memory_che } if (doris::config::crash_in_alloc_large_memory_bytes > 0 && size > doris::config::crash_in_alloc_large_memory_bytes) { - throw Exception(Status::FatalError( + LOG(FATAL) << fmt::format( "alloc large memory: {}, {}, crash generate core dumpsto help analyze, " "stacktrace:\n{}", size, is_attach_query() ? "in query or load: " + print_id(_query_id) : "not in query or load", - get_stack_trace())); + get_stack_trace()); } } } diff --git a/be/src/runtime/snapshot_loader.cpp b/be/src/runtime/snapshot_loader.cpp index b492a929fca3bf..784904c78a3fb1 100644 --- a/be/src/runtime/snapshot_loader.cpp +++ b/be/src/runtime/snapshot_loader.cpp @@ -74,7 +74,7 @@ Status upload_with_checksum(io::RemoteFileSystem& fs, std::string_view local_pat RETURN_IF_ERROR(fs.upload(local_path, full_remote_path)); break; default: - throw Exception(Status::FatalError("unknown fs type: {}", static_cast(fs.type()))); + LOG(FATAL) << "unknown fs type: " << static_cast(fs.type()); } return Status::OK(); } @@ -807,7 +807,8 @@ Status SnapshotLoader::move(const std::string& snapshot_path, TabletSharedPtr ta } } else { - throw Exception(Status::FatalError("only support overwrite now")); + LOG(FATAL) << "only support overwrite now"; + __builtin_unreachable(); } // snapshot loader not need to change tablet uid diff --git a/be/src/runtime/stream_load/stream_load_executor.cpp b/be/src/runtime/stream_load/stream_load_executor.cpp index 054de96a881425..ad4d22946f1b83 100644 --- a/be/src/runtime/stream_load/stream_load_executor.cpp +++ b/be/src/runtime/stream_load/stream_load_executor.cpp @@ -390,7 +390,8 @@ bool StreamLoadExecutor::collect_load_stat(StreamLoadContext* ctx, TTxnCommitAtt } switch (ctx->load_type) { case TLoadType::MINI_LOAD: { - throw Exception(Status::FatalError("mini load is not supported any more")); + LOG(FATAL) << "mini load is not supported any more"; + break; } case TLoadType::ROUTINE_LOAD: { attach->loadType = TLoadType::ROUTINE_LOAD; diff --git a/be/src/runtime/thread_context.h b/be/src/runtime/thread_context.h index 9ba7949ec5afad..e0a44af69c1d66 100644 --- a/be/src/runtime/thread_context.h +++ b/be/src/runtime/thread_context.h @@ -354,7 +354,8 @@ class ThreadLocalHandle { DCHECK(bthread_context != nullptr); bthread_context->thread_local_handle_count--; } else { - throw Exception(Status::FatalError("__builtin_unreachable")); + LOG(FATAL) << "__builtin_unreachable"; + __builtin_unreachable(); } } }; @@ -378,8 +379,8 @@ static ThreadContext* thread_context(bool allow_return_null = false) { return nullptr; } // It means that use thread_context() but this thread not attached a query/load using SCOPED_ATTACH_TASK macro. - throw Exception( - Status::FatalError("__builtin_unreachable, {}", doris::memory_orphan_check_msg)); + LOG(FATAL) << "__builtin_unreachable, " << doris::memory_orphan_check_msg; + __builtin_unreachable(); } // belong to one query object member, not be shared by multiple queries. diff --git a/be/src/util/binary_cast.hpp b/be/src/util/binary_cast.hpp index e7c62ad45ac091..8a91ab3a579152 100644 --- a/be/src/util/binary_cast.hpp +++ b/be/src/util/binary_cast.hpp @@ -137,7 +137,8 @@ To binary_cast(From from) { conv.decimal = from; return conv.i128; } else { - throw Exception(Status::FatalError("__builtin_unreachable")); + LOG(FATAL) << "__builtin_unreachable"; + __builtin_unreachable(); } } diff --git a/be/src/util/bit_util.h b/be/src/util/bit_util.h index 5ec5a8bf8e1aa4..504b0b27428190 100644 --- a/be/src/util/bit_util.h +++ b/be/src/util/bit_util.h @@ -237,7 +237,9 @@ class BitUtil { } else if constexpr (std::is_same_v) { return value; } else { - throw Exception(Status::FatalError("__builtin_unreachable")); + __builtin_unreachable(); + LOG(FATAL) << "__builtin_unreachable"; + return value; } } diff --git a/be/src/util/bitmap_value.h b/be/src/util/bitmap_value.h index 528dbe40788229..2d15ac99611274 100644 --- a/be/src/util/bitmap_value.h +++ b/be/src/util/bitmap_value.h @@ -2519,7 +2519,8 @@ class BitmapValueIterator { } break; case BitmapValue::BitmapDataType::SET: { - throw Exception(Status::FatalError("BitmapValue with set do not support move")); + LOG(FATAL) << "BitmapValue with set do not support move"; + break; } default: break; diff --git a/be/src/util/block_compression.cpp b/be/src/util/block_compression.cpp index 7a0aacd4252dec..d1788b0948a6f2 100644 --- a/be/src/util/block_compression.cpp +++ b/be/src/util/block_compression.cpp @@ -233,8 +233,7 @@ class HadoopLz4BlockCompression : public Lz4BlockCompression { HadoopLz4BlockCompression() { Status st = Decompressor::create_decompressor(CompressType::LZ4BLOCK, &_decompressor); if (!st.ok()) { - throw Exception(Status::FatalError( - "HadoopLz4BlockCompression construction failed. status = {}", st)); + LOG(FATAL) << "HadoopLz4BlockCompression construction failed. status = " << st << "\n"; } } diff --git a/be/src/util/easy_json.cc b/be/src/util/easy_json.cc index fcb8021e3836b2..46c3a1867f7b42 100644 --- a/be/src/util/easy_json.cc +++ b/be/src/util/easy_json.cc @@ -27,8 +27,6 @@ #include #include #include - -#include "common/exception.h" // IWYU pragma: no_include using rapidjson::SizeType; @@ -202,7 +200,8 @@ EasyJson EasyJson::PushBack(EasyJson::ComplexTypeInitializer val) { } else if (val == kArray) { push_val.SetArray(); } else { - throw Exception(Status::FatalError("Unknown initializer type")); + LOG(FATAL) << "Unknown initializer type"; + __builtin_unreachable(); } value_->PushBack(push_val, alloc_->allocator()); return EasyJson(&(*value_)[value_->Size() - 1], alloc_); diff --git a/be/src/util/jsonb_utils.h b/be/src/util/jsonb_utils.h index 8ec842ef227dd5..7dba0dca3af1eb 100644 --- a/be/src/util/jsonb_utils.h +++ b/be/src/util/jsonb_utils.h @@ -23,7 +23,6 @@ #include -#include "common/exception.h" #include "jsonb_document.h" #include "jsonb_stream.h" #include "jsonb_writer.h" @@ -43,8 +42,7 @@ class JsonbToJson { const std::string to_json_string(const char* data, size_t size) { JsonbDocument* pdoc = doris::JsonbDocument::createDocument(data, size); if (!pdoc) { - throw Exception(Status::FatalError("invalid json binary value: {}", - std::string_view(data, size))); + LOG(FATAL) << "invalid json binary value: " << std::string_view(data, size); } return to_json_string(pdoc->getValue()); } diff --git a/be/src/util/rle_encoding.h b/be/src/util/rle_encoding.h index 5369ace9eed6ce..206349b472815d 100644 --- a/be/src/util/rle_encoding.h +++ b/be/src/util/rle_encoding.h @@ -283,7 +283,7 @@ void RleDecoder::RewindOne() { switch (rewind_state_) { case CANT_REWIND: - throw Exception(Status::FatalError("Can't rewind more than once after each read!")); + LOG(FATAL) << "Can't rewind more than once after each read!"; break; case REWIND_RUN: ++repeat_count_; diff --git a/be/src/util/threadpool.cpp b/be/src/util/threadpool.cpp index e9af13f556e143..f5ea38515def36 100644 --- a/be/src/util/threadpool.cpp +++ b/be/src/util/threadpool.cpp @@ -27,7 +27,6 @@ #include #include -#include "common/exception.h" #include "common/logging.h" #include "gutil/map-util.h" #include "gutil/port.h" @@ -195,7 +194,7 @@ void ThreadPoolToken::transition(State new_state) { CHECK(false); // QUIESCED is a terminal state break; default: - throw Exception(Status::FatalError("Unknown token state: {}", _state)); + LOG(FATAL) << "Unknown token state: " << _state; } #endif @@ -617,10 +616,10 @@ Status ThreadPool::create_thread() { void ThreadPool::check_not_pool_thread_unlocked() { Thread* current = Thread::current_thread(); if (ContainsKey(_threads, current)) { - throw Exception( - Status::FatalError("Thread belonging to thread pool {} with " - "name {} called pool function that would result in deadlock", - _name, current->name())); + LOG(FATAL) << strings::Substitute( + "Thread belonging to thread pool '$0' with " + "name '$1' called pool function that would result in deadlock", + _name, current->name()); } } diff --git a/be/src/util/timezone_utils.cpp b/be/src/util/timezone_utils.cpp index a26ad3703b79b9..6bb71ac46471c9 100644 --- a/be/src/util/timezone_utils.cpp +++ b/be/src/util/timezone_utils.cpp @@ -35,7 +35,6 @@ #include #include -#include "common/exception.h" #include "common/logging.h" #include "common/status.h" @@ -84,7 +83,8 @@ void TimezoneUtils::load_timezones_to_cache() { const auto root_path = fs::path {base_str}; if (!exists(root_path)) { - throw Exception(Status::FatalError("Cannot find system tzfile. Doris exiting!")); + LOG(FATAL) << "Cannot find system tzfile. Doris exiting!"; + __builtin_unreachable(); } std::set ignore_paths = {"posix", "right"}; // duplications. ignore them. diff --git a/be/src/vec/aggregate_functions/aggregate_function_map.h b/be/src/vec/aggregate_functions/aggregate_function_map.h index 7273390e7c5342..17bc54f7499adb 100644 --- a/be/src/vec/aggregate_functions/aggregate_function_map.h +++ b/be/src/vec/aggregate_functions/aggregate_function_map.h @@ -40,7 +40,10 @@ struct AggregateFunctionMapAggData { using KeyType = std::conditional_t, StringRef, K>; using Map = phmap::flat_hash_map; - AggregateFunctionMapAggData() { throw Exception(Status::FatalError("__builtin_unreachable")); } + AggregateFunctionMapAggData() { + LOG(FATAL) << "__builtin_unreachable"; + __builtin_unreachable(); + } AggregateFunctionMapAggData(const DataTypes& argument_types) { _key_type = remove_nullable(argument_types[0]); diff --git a/be/src/vec/aggregate_functions/aggregate_function_reader_first_last.h b/be/src/vec/aggregate_functions/aggregate_function_reader_first_last.h index 6f5d680d3eb0fc..8efea2dc6fc8e4 100644 --- a/be/src/vec/aggregate_functions/aggregate_function_reader_first_last.h +++ b/be/src/vec/aggregate_functions/aggregate_function_reader_first_last.h @@ -238,17 +238,24 @@ class ReaderFunctionData final void add_range_single_place(int64_t partition_start, int64_t partition_end, int64_t frame_start, int64_t frame_end, AggregateDataPtr place, const IColumn** columns, Arena*) const override { - throw doris::Exception( - Status::FatalError("ReaderFunctionData do not support add_range_single_place")); + throw doris::Exception(ErrorCode::INTERNAL_ERROR, + "ReaderFunctionData do not support add_range_single_place"); + __builtin_unreachable(); } void merge(AggregateDataPtr place, ConstAggregateDataPtr rhs, Arena*) const override { - throw doris::Exception(Status::FatalError("ReaderFunctionData do not support merge")); + throw doris::Exception(ErrorCode::INTERNAL_ERROR, + "ReaderFunctionData do not support merge"); + __builtin_unreachable(); } void serialize(ConstAggregateDataPtr place, BufferWritable& buf) const override { - throw doris::Exception(Status::FatalError("ReaderFunctionData do not support serialize")); + throw doris::Exception(ErrorCode::INTERNAL_ERROR, + "ReaderFunctionData do not support serialize"); + __builtin_unreachable(); } void deserialize(AggregateDataPtr place, BufferReadable& buf, Arena*) const override { - throw doris::Exception(Status::FatalError("ReaderFunctionData do not support deserialize")); + throw doris::Exception(ErrorCode::INTERNAL_ERROR, + "ReaderFunctionData do not support deserialize"); + __builtin_unreachable(); } private: diff --git a/be/src/vec/aggregate_functions/aggregate_function_window.h b/be/src/vec/aggregate_functions/aggregate_function_window.h index 0cef4c82d3dbfe..13fa8e74751df6 100644 --- a/be/src/vec/aggregate_functions/aggregate_function_window.h +++ b/be/src/vec/aggregate_functions/aggregate_function_window.h @@ -563,19 +563,24 @@ class WindowFunctionData final void add(AggregateDataPtr place, const IColumn** columns, ssize_t row_num, Arena*) const override { - throw doris::Exception(Status::FatalError("WindowFunctionLeadLagData do not support add")); + throw doris::Exception(ErrorCode::INTERNAL_ERROR, + "WindowFunctionLeadLagData do not support add"); + __builtin_unreachable(); } void merge(AggregateDataPtr place, ConstAggregateDataPtr rhs, Arena*) const override { - throw doris::Exception( - Status::FatalError("WindowFunctionLeadLagData do not support merge")); + throw doris::Exception(ErrorCode::INTERNAL_ERROR, + "WindowFunctionLeadLagData do not support merge"); + __builtin_unreachable(); } void serialize(ConstAggregateDataPtr place, BufferWritable& buf) const override { - throw doris::Exception( - Status::FatalError("WindowFunctionLeadLagData do not support serialize")); + throw doris::Exception(ErrorCode::INTERNAL_ERROR, + "WindowFunctionLeadLagData do not support serialize"); + __builtin_unreachable(); } void deserialize(AggregateDataPtr place, BufferReadable& buf, Arena*) const override { - throw doris::Exception( - Status::FatalError("WindowFunctionLeadLagData do not support deserialize")); + throw doris::Exception(ErrorCode::INTERNAL_ERROR, + "WindowFunctionLeadLagData do not support deserialize"); + __builtin_unreachable(); } private: diff --git a/be/src/vec/columns/column_string.cpp b/be/src/vec/columns/column_string.cpp index db0088e67c27b6..cb83a29bbada2c 100644 --- a/be/src/vec/columns/column_string.cpp +++ b/be/src/vec/columns/column_string.cpp @@ -40,16 +40,16 @@ template void ColumnStr::sanity_check() const { auto count = offsets.size(); if (chars.size() != offsets[count - 1]) { - throw Exception(Status::FatalError("row count: {}, chars.size(): {}, offset[{}]: ", count, - chars.size(), count - 1, offsets[count - 1])); + LOG(FATAL) << "row count: " << count << ", chars.size(): " << chars.size() << ", offset[" + << count - 1 << "]: " << offsets[count - 1]; } if (offsets[-1] != 0) { - throw Exception(Status::FatalError("wrong offsets[-1]: {}", offsets[-1])); + LOG(FATAL) << "wrong offsets[-1]: " << offsets[-1]; } for (size_t i = 0; i < count; ++i) { if (offsets[i] < offsets[i - 1]) { - throw Exception(Status::FatalError("row count: {}, offsets[{}]: {}, offsets[{}]: {}", - count, i, offsets[i], i - 1, offsets[i - 1])); + LOG(FATAL) << "row count: " << count << ", offsets[" << i << "]: " << offsets[i] + << ", offsets[" << i - 1 << "]: " << offsets[i - 1]; } } } diff --git a/be/src/vec/common/assert_cast.h b/be/src/vec/common/assert_cast.h index 1905983a58cc29..02dce99e967bdb 100644 --- a/be/src/vec/common/assert_cast.h +++ b/be/src/vec/common/assert_cast.h @@ -23,7 +23,6 @@ #include #include -#include "common/exception.h" #include "common/logging.h" #include "vec/common/demangle.h" @@ -46,33 +45,35 @@ PURE To assert_cast(From&& from) { if (auto ptr = dynamic_cast(from); ptr != nullptr) { return ptr; } - throw doris::Exception(doris::Status::FatalError("Bad cast from type:{}* to {}", - demangle(typeid(*from).name()), - demangle(typeid(To).name()))); + LOG(FATAL) << fmt::format("Bad cast from type:{}* to {}", + demangle(typeid(*from).name()), + demangle(typeid(To).name())); } } else { if (typeid(from) == typeid(To)) { return static_cast(from); } } - throw doris::Exception(doris::Status::FatalError("Bad cast from type:{} to {}", - demangle(typeid(from).name()), - demangle(typeid(To).name()))); + LOG(FATAL) << fmt::format("Bad cast from type:{} to {}", demangle(typeid(from).name()), + demangle(typeid(To).name())); + __builtin_unreachable(); }; #ifndef NDEBUG try { return perform_cast(std::forward(from)); } catch (const std::exception& e) { - throw doris::Exception(doris::Status::FatalError("assert cast err:{}", e.what())); + LOG(FATAL) << "assert cast err:" << e.what(); } + __builtin_unreachable(); #else if constexpr (check == TypeCheckOnRelease::ENABLE) { try { return perform_cast(std::forward(from)); } catch (const std::exception& e) { - throw doris::Exception(doris::Status::FatalError("assert cast err:{}", e.what())); + LOG(FATAL) << "assert cast err:" << e.what(); } + __builtin_unreachable(); } else { return static_cast(from); } diff --git a/be/src/vec/common/hash_table/string_hash_table.h b/be/src/vec/common/hash_table/string_hash_table.h index 892598a83263b9..74be1e85e1efe8 100644 --- a/be/src/vec/common/hash_table/string_hash_table.h +++ b/be/src/vec/common/hash_table/string_hash_table.h @@ -327,7 +327,8 @@ class StringHashTable : private boost::noncopyable { return iterator5 == rhs.iterator5; } } - throw doris::Exception(doris::Status::FatalError("__builtin_unreachable")); + LOG(FATAL) << "__builtin_unreachable"; + __builtin_unreachable(); } bool operator!=(const iterator_base& rhs) const { return !(*this == rhs); } diff --git a/be/src/vec/common/schema_util.cpp b/be/src/vec/common/schema_util.cpp index 2b1c71c643d613..fd50af3e1fcd88 100644 --- a/be/src/vec/common/schema_util.cpp +++ b/be/src/vec/common/schema_util.cpp @@ -133,7 +133,7 @@ size_t get_size_of_interger(TypeIndex type) { case TypeIndex::UInt128: return sizeof(uint128_t); default: - throw Exception(Status::FatalError("Unknown integer type: {}", getTypeName(type))); + LOG(FATAL) << "Unknown integer type: " << getTypeName(type); return 0; } } @@ -231,7 +231,8 @@ void get_column_by_type(const vectorized::DataTypePtr& data_type, const std::str return; } // TODO handle more types like struct/date/datetime/decimal... - throw Exception(Status::FatalError("__builtin_unreachable")); + LOG(FATAL) << "__builtin_unreachable"; + __builtin_unreachable(); } TabletColumn get_column_by_type(const vectorized::DataTypePtr& data_type, const std::string& name, diff --git a/be/src/vec/core/block.cpp b/be/src/vec/core/block.cpp index 951c2661faf172..4dc553b1a5790f 100644 --- a/be/src/vec/core/block.cpp +++ b/be/src/vec/core/block.cpp @@ -644,10 +644,10 @@ Block Block::clone_with_columns(const Columns& columns) const { size_t num_columns = data.size(); if (num_columns != columns.size()) { - throw Exception(Status::FatalError( + LOG(FATAL) << fmt::format( "Cannot clone block with columns because block has {} columns, but {} columns " "given.", - num_columns, columns.size())); + num_columns, columns.size()); } for (size_t i = 0; i < num_columns; ++i) { diff --git a/be/src/vec/core/decimal_comparison.h b/be/src/vec/core/decimal_comparison.h index 4503a264c28014..9e9d9ad399ae04 100644 --- a/be/src/vec/core/decimal_comparison.h +++ b/be/src/vec/core/decimal_comparison.h @@ -82,9 +82,8 @@ class DecimalComparison { DecimalComparison(Block& block, uint32_t result, const ColumnWithTypeAndName& col_left, const ColumnWithTypeAndName& col_right) { if (!apply(block, result, col_left, col_right)) { - throw Exception(Status::FatalError("Wrong decimal comparison with {} and {}", - col_left.type->get_name(), - col_right.type->get_name())); + LOG(FATAL) << fmt::format("Wrong decimal comparison with {} and {}", + col_left.type->get_name(), col_right.type->get_name()); } } @@ -107,7 +106,8 @@ class DecimalComparison { static bool compare(A a, B b, UInt32 scale_a, UInt32 scale_b) { static const UInt32 max_scale = max_decimal_precision(); if (scale_a > max_scale || scale_b > max_scale) { - throw Exception(Status::FatalError("Bad scale of decimal field")); + LOG(FATAL) << "Bad scale of decimal field"; + __builtin_unreachable(); } Shift shift; @@ -213,7 +213,8 @@ class DecimalComparison { if (const ColVecB* c1_vec = check_and_get_column(c1.get())) constant_vector(a, c1_vec->get_data(), vec_res, scale); else { - throw Exception(Status::FatalError("Wrong column in Decimal comparison")); + LOG(FATAL) << "Wrong column in Decimal comparison"; + __builtin_unreachable(); } } else if (c1_is_const) { const ColumnConst* c1_const = check_and_get_column_const(c1.get()); @@ -221,7 +222,8 @@ class DecimalComparison { if (const ColVecA* c0_vec = check_and_get_column(c0.get())) vector_constant(c0_vec->get_data(), b, vec_res, scale); else { - throw Exception(Status::FatalError("Wrong column in Decimal comparison")); + LOG(FATAL) << "Wrong column in Decimal comparison"; + __builtin_unreachable(); } } else { if (const ColVecA* c0_vec = check_and_get_column(c0.get())) { @@ -229,10 +231,12 @@ class DecimalComparison { vector_vector(c0_vec->get_data(), c1_vec->get_data(), vec_res, scale); else { - throw Exception(Status::FatalError("Wrong column in Decimal comparison")); + LOG(FATAL) << "Wrong column in Decimal comparison"; + __builtin_unreachable(); } } else { - throw Exception(Status::FatalError("Wrong column in Decimal comparison")); + LOG(FATAL) << "Wrong column in Decimal comparison"; + __builtin_unreachable(); } } return c_res; @@ -258,7 +262,8 @@ class DecimalComparison { if constexpr (scale_right) overflow |= common::mul_overflow(y, scale, y); if (overflow) { - throw Exception(Status::FatalError("Can't compare")); + LOG(FATAL) << "Can't compare"; + __builtin_unreachable(); } } else { if constexpr (scale_left) x *= scale; diff --git a/be/src/vec/core/field.h b/be/src/vec/core/field.h index 1176840738a289..341f65e075ed11 100644 --- a/be/src/vec/core/field.h +++ b/be/src/vec/core/field.h @@ -38,7 +38,6 @@ #include #include "common/compiler_util.h" // IWYU pragma: keep -#include "common/exception.h" #include "olap/hll.h" #include "util/bitmap_value.h" #include "util/quantile_state.h" @@ -169,7 +168,7 @@ class JsonbField { JsonbField(const char* ptr, size_t len) : size(len) { data = new char[size]; if (!data) { - throw Exception(Status::FatalError("new data buffer failed, size: {}", size)); + LOG(FATAL) << "new data buffer failed, size: " << size; } memcpy(data, ptr, size); } @@ -177,7 +176,7 @@ class JsonbField { JsonbField(const JsonbField& x) : size(x.size) { data = new char[size]; if (!data) { - throw Exception(Status::FatalError("new data buffer failed, size: {}", size)); + LOG(FATAL) << "new data buffer failed, size: " << size; } memcpy(data, x.data, size); } @@ -190,7 +189,7 @@ class JsonbField { JsonbField& operator=(const JsonbField& x) { data = new char[size]; if (!data) { - throw Exception(Status::FatalError("new data buffer failed, size: {}", size)); + LOG(FATAL) << "new data buffer failed, size: " << size; } memcpy(data, x.data, size); return *this; @@ -217,30 +216,38 @@ class JsonbField { size_t get_size() const { return size; } bool operator<(const JsonbField& r) const { - throw Exception(Status::FatalError("comparing between JsonbField is not supported")); + LOG(FATAL) << "comparing between JsonbField is not supported"; + __builtin_unreachable(); } bool operator<=(const JsonbField& r) const { - throw Exception(Status::FatalError("comparing between JsonbField is not supported")); + LOG(FATAL) << "comparing between JsonbField is not supported"; + __builtin_unreachable(); } bool operator==(const JsonbField& r) const { - throw Exception(Status::FatalError("comparing between JsonbField is not supported")); + LOG(FATAL) << "comparing between JsonbField is not supported"; + __builtin_unreachable(); } bool operator>(const JsonbField& r) const { - throw Exception(Status::FatalError("comparing between JsonbField is not supported")); + LOG(FATAL) << "comparing between JsonbField is not supported"; + __builtin_unreachable(); } bool operator>=(const JsonbField& r) const { - throw Exception(Status::FatalError("comparing between JsonbField is not supported")); + LOG(FATAL) << "comparing between JsonbField is not supported"; + __builtin_unreachable(); } bool operator!=(const JsonbField& r) const { - throw Exception(Status::FatalError("comparing between JsonbField is not supported")); + LOG(FATAL) << "comparing between JsonbField is not supported"; + __builtin_unreachable(); } const JsonbField& operator+=(const JsonbField& r) { - throw Exception(Status::FatalError("Not support plus opration on JsonbField")); + LOG(FATAL) << "Not support plus opration on JsonbField"; + __builtin_unreachable(); } const JsonbField& operator-=(const JsonbField& r) { - throw Exception(Status::FatalError("Not support minus opration on JsonbField")); + LOG(FATAL) << "Not support minus opration on JsonbField"; + __builtin_unreachable(); } private: @@ -298,7 +305,8 @@ class DecimalField { const DecimalField& operator+=(const DecimalField& r) { if (scale != r.get_scale()) { - throw Exception(Status::FatalError("Add different decimal fields")); + LOG(FATAL) << "Add different decimal fields"; + __builtin_unreachable(); } dec += r.get_value(); return *this; @@ -306,7 +314,8 @@ class DecimalField { const DecimalField& operator-=(const DecimalField& r) { if (scale != r.get_scale()) { - throw Exception(Status::FatalError("Sub different decimal fields")); + LOG(FATAL) << "Sub different decimal fields"; + __builtin_unreachable(); } dec -= r.get_value(); return *this; @@ -413,8 +422,8 @@ class Field { case IPv6: return "IPv6"; default: - throw Exception( - Status::FatalError("type not supported, type={}", Types::to_string(which))); + LOG(FATAL) << "type not supported, type=" << Types::to_string(which); + break; } __builtin_unreachable(); } @@ -549,9 +558,8 @@ class Field { return which <=> rhs.which; } if (which != rhs.which) { - throw Exception(Status::FatalError("lhs type not equal with rhs, lhs={}, rhs={}", - Types::to_string(which), - Types::to_string(rhs.which))); + LOG(FATAL) << "lhs type not equal with rhs, lhs=" << Types::to_string(which) + << ", rhs=" << Types::to_string(rhs.which); } switch (which) { @@ -593,9 +601,9 @@ class Field { case Types::Decimal256: return get() <=> rhs.get(); default: - throw Exception(Status::FatalError("lhs type not equal with rhs, lhs={}, rhs={}", - Types::to_string(which), - Types::to_string(rhs.which))); + LOG(FATAL) << "lhs type not equal with rhs, lhs=" << Types::to_string(which) + << ", rhs=" << Types::to_string(rhs.which); + break; } } @@ -667,8 +675,8 @@ class Field { f(field.template get()); return; default: - throw Exception(Status::FatalError("type not supported, type={}", - Types::to_string(field.which))); + LOG(FATAL) << "type not supported, type=" << Types::to_string(field.which); + break; } } diff --git a/be/src/vec/core/types.h b/be/src/vec/core/types.h index 223dc13c8182bd..c817c6ab273f42 100644 --- a/be/src/vec/core/types.h +++ b/be/src/vec/core/types.h @@ -942,7 +942,8 @@ inline const char* getTypeName(TypeIndex idx) { return "Time"; } - throw Exception(Status::FatalError("__builtin_unreachable")); + LOG(FATAL) << "__builtin_unreachable"; + __builtin_unreachable(); } // NOLINTEND(readability-function-size) } // namespace vectorized diff --git a/be/src/vec/data_types/data_type_number_base.cpp b/be/src/vec/data_types/data_type_number_base.cpp index 55330bd2797772..1afed3d7d1a394 100644 --- a/be/src/vec/data_types/data_type_number_base.cpp +++ b/be/src/vec/data_types/data_type_number_base.cpp @@ -158,7 +158,8 @@ Field DataTypeNumberBase::get_field(const TExprNode& node) const { if constexpr (std::is_same_v, TypeId>) { return Float64(node.float_literal.value); } - throw Exception(Status::FatalError("__builtin_unreachable")); + LOG(FATAL) << "__builtin_unreachable"; + __builtin_unreachable(); } template diff --git a/be/src/vec/data_types/data_type_number_base.h b/be/src/vec/data_types/data_type_number_base.h index c560fdd01adac3..a73bd9951891a3 100644 --- a/be/src/vec/data_types/data_type_number_base.h +++ b/be/src/vec/data_types/data_type_number_base.h @@ -125,7 +125,8 @@ class DataTypeNumberBase : public IDataType { if constexpr (std::is_same_v, TypeId>) { return doris::FieldType::OLAP_FIELD_TYPE_DOUBLE; } - throw Exception(Status::FatalError("__builtin_unreachable")); + LOG(FATAL) << "__builtin_unreachable"; + __builtin_unreachable(); } Field get_default() const override; diff --git a/be/src/vec/data_types/serde/data_type_serde.h b/be/src/vec/data_types/serde/data_type_serde.h index 122a700cf9b20b..1a089bb73fe99c 100644 --- a/be/src/vec/data_types/serde/data_type_serde.h +++ b/be/src/vec/data_types/serde/data_type_serde.h @@ -395,9 +395,8 @@ inline static NullMap revert_null_map(const NullMap* null_bytemap, size_t start, inline void checkArrowStatus(const arrow::Status& status, const std::string& column, const std::string& format_name) { if (!status.ok()) { - throw Exception( - Status::FatalError("arrow serde with arrow: {} with column : {} with error msg: {}", - format_name, column, status.ToString())); + LOG(FATAL) << "arrow serde with arrow: " << format_name << " with column : " << column + << " with error msg: " << status.ToString(); } } diff --git a/be/src/vec/exec/format/parquet/bool_rle_decoder.cpp b/be/src/vec/exec/format/parquet/bool_rle_decoder.cpp index 3f46a9c0073568..17ce68e604e9b8 100644 --- a/be/src/vec/exec/format/parquet/bool_rle_decoder.cpp +++ b/be/src/vec/exec/format/parquet/bool_rle_decoder.cpp @@ -36,16 +36,15 @@ void BoolRLEDecoder::set_data(Slice* slice) { _offset = 0; _current_value_idx = 0; if (_num_bytes < 4) { - throw Exception(Status::FatalError("Received invalid length : {} (corrupt data page?)", - std::to_string(_num_bytes))); + LOG(FATAL) << "Received invalid length : " + std::to_string(_num_bytes) + + " (corrupt data page?)"; } // Load the first 4 bytes in little-endian, which indicates the length const uint8_t* data = reinterpret_cast(_data->data); uint32_t num_bytes = decode_fixed32_le(data); if (num_bytes > static_cast(_num_bytes - 4)) { - throw Exception( - Status::FatalError("Received invalid number of bytes : {} (corrupt data page?)", - std::to_string(_num_bytes))); + LOG(FATAL) << ("Received invalid number of bytes : " + std::to_string(num_bytes) + + " (corrupt data page?)"); } _num_bytes = num_bytes; auto decoder_data = data + 4; diff --git a/be/src/vec/exec/format/parquet/decoder.h b/be/src/vec/exec/format/parquet/decoder.h index 06e131b5b56049..1654878af80a29 100644 --- a/be/src/vec/exec/format/parquet/decoder.h +++ b/be/src/vec/exec/format/parquet/decoder.h @@ -79,8 +79,8 @@ class Decoder { } virtual MutableColumnPtr convert_dict_column_to_string_column(const ColumnInt32* dict_column) { - throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, - "Method convert_dict_column_to_string_column is not supported"); + LOG(FATAL) << "Method convert_dict_column_to_string_column is not supported"; + __builtin_unreachable(); } protected: diff --git a/be/src/vec/exec/format/parquet/delta_bit_pack_decoder.h b/be/src/vec/exec/format/parquet/delta_bit_pack_decoder.h index dbe90acc985a4d..9497aa1cb1cdb5 100644 --- a/be/src/vec/exec/format/parquet/delta_bit_pack_decoder.h +++ b/be/src/vec/exec/format/parquet/delta_bit_pack_decoder.h @@ -177,8 +177,7 @@ class DeltaBitPackDecoder final : public DeltaDecoder { _bit_reader.reset(new BitReader((const uint8_t*)slice->data, slice->size)); Status st = _init_header(); if (!st.ok()) { - throw Exception(Status::FatalError("Fail to init delta encoding header for {}", - st.to_string())); + LOG(FATAL) << "Fail to init delta encoding header for " << st.to_string(); } _data = slice; _offset = 0; @@ -190,8 +189,7 @@ class DeltaBitPackDecoder final : public DeltaDecoder { _bit_reader = std::move(bit_reader); Status st = _init_header(); if (!st.ok()) { - throw Exception(Status::FatalError("Fail to init delta encoding header for {}", - st.to_string())); + LOG(FATAL) << "Fail to init delta encoding header for " << st.to_string(); } } @@ -347,7 +345,7 @@ class DeltaByteArrayDecoder : public DeltaDecoder { int ret; Status st = _prefix_len_decoder.decode(_buffered_prefix_length.data(), num_prefix, &ret); if (!st.ok()) { - throw Exception(Status::FatalError("Fail to decode delta prefix, status: {}", st)); + LOG(FATAL) << "Fail to decode delta prefix, status: " << st; } DCHECK_EQ(ret, num_prefix); _prefix_len_offset = 0; @@ -529,7 +527,7 @@ void DeltaLengthByteArrayDecoder::_decode_lengths() { int ret; Status st = _len_decoder.decode(_buffered_length.data(), num_length, &ret); if (!st.ok()) { - throw Exception(Status::FatalError("Fail to decode delta length, status: {}", st)); + LOG(FATAL) << "Fail to decode delta length, status: " << st; } DCHECK_EQ(ret, num_length); _length_idx = 0; diff --git a/be/src/vec/exec/format/parquet/parquet_column_convert.h b/be/src/vec/exec/format/parquet/parquet_column_convert.h index d35a69ff59c625..cf6f8aa13fa1d1 100644 --- a/be/src/vec/exec/format/parquet/parquet_column_convert.h +++ b/be/src/vec/exec/format/parquet/parquet_column_convert.h @@ -423,7 +423,8 @@ class FixedSizeToDecimal : public PhysicalToLogicalConverter { switch (_type_length) { APPLY_FOR_DECIMALS() default: - throw Exception(Status::FatalError("__builtin_unreachable")); + LOG(FATAL) << "__builtin_unreachable"; + __builtin_unreachable(); } return Status::OK(); #undef APPLY_FOR_DECIMALS @@ -455,7 +456,8 @@ class FixedSizeToDecimal : public PhysicalToLogicalConverter { } else if constexpr (ScaleType == DecimalScaleParams::NO_SCALE) { // do nothing } else { - throw Exception(Status::FatalError("__builtin_unreachable")); + LOG(FATAL) << "__builtin_unreachable"; + __builtin_unreachable(); } auto& v = reinterpret_cast(data[start_idx + i]); v = (DecimalType)value; @@ -499,7 +501,8 @@ class StringToDecimal : public PhysicalToLogicalConverter { } else if constexpr (ScaleType == DecimalScaleParams::NO_SCALE) { // do nothing } else { - throw Exception(Status::FatalError("__builtin_unreachable")); + LOG(FATAL) << "__builtin_unreachable"; + __builtin_unreachable(); } } auto& v = reinterpret_cast(data[start_idx + i]); diff --git a/be/src/vec/exec/format/parquet/vparquet_column_reader.h b/be/src/vec/exec/format/parquet/vparquet_column_reader.h index a8062d2d9f9b7c..4c6e5b1eac9f60 100644 --- a/be/src/vec/exec/format/parquet/vparquet_column_reader.h +++ b/be/src/vec/exec/format/parquet/vparquet_column_reader.h @@ -129,8 +129,8 @@ class ParquetColumnReader { } virtual MutableColumnPtr convert_dict_column_to_string_column(const ColumnInt32* dict_column) { - throw Exception( - Status::FatalError("Method convert_dict_column_to_string_column is not supported")); + LOG(FATAL) << "Method convert_dict_column_to_string_column is not supported"; + __builtin_unreachable(); } static Status create(io::FileReaderSPtr file, FieldSchema* field, diff --git a/be/src/vec/exec/jni_connector.cpp b/be/src/vec/exec/jni_connector.cpp index 11a58e81c98d89..a87ccf987ac7af 100644 --- a/be/src/vec/exec/jni_connector.cpp +++ b/be/src/vec/exec/jni_connector.cpp @@ -185,8 +185,8 @@ Status JniConnector::close() { jthrowable exc = (env)->ExceptionOccurred(); if (exc != nullptr) { // Ensure successful resource release - throw Exception(Status::FatalError("Failed to release jni resource: {}", - JniUtil::GetJniExceptionMsg(env).to_string())); + LOG(FATAL) << "Failed to release jni resource: " + << JniUtil::GetJniExceptionMsg(env).to_string(); } } return Status::OK(); diff --git a/be/src/vec/exec/scan/split_source_connector.h b/be/src/vec/exec/scan/split_source_connector.h index abe59562578aaf..8f38cd4f17a18f 100644 --- a/be/src/vec/exec/scan/split_source_connector.h +++ b/be/src/vec/exec/scan/split_source_connector.h @@ -117,8 +117,7 @@ class LocalSplitSourceConnector : public SplitSourceConnector { // for compatibility. return &_scan_ranges[0].scan_range.ext_scan_range.file_scan_range.params; } - throw Exception( - Status::FatalError("Unreachable, params is got by file_scan_range_params_map")); + LOG(FATAL) << "Unreachable, params is got by file_scan_range_params_map"; } }; @@ -161,8 +160,7 @@ class RemoteSplitSourceConnector : public SplitSourceConnector { int num_scan_ranges() override { return _num_splits; } TFileScanRangeParams* get_params() override { - throw Exception( - Status::FatalError("Unreachable, params is got by file_scan_range_params_map")); + LOG(FATAL) << "Unreachable, params is got by file_scan_range_params_map"; } }; diff --git a/be/src/vec/exprs/vexpr.h b/be/src/vec/exprs/vexpr.h index 91786337244013..953fbaa9c38c8d 100644 --- a/be/src/vec/exprs/vexpr.h +++ b/be/src/vec/exprs/vexpr.h @@ -237,18 +237,18 @@ class VExpr { // If this expr is a BloomPredicate, this method will return a BloomFilterFunc virtual std::shared_ptr get_bloom_filter_func() const { - throw Exception(Status::FatalError( - "Method 'get_bloom_filter_func()' is not supported in expression: {}", - this->debug_string())); + LOG(FATAL) << "Method 'get_bloom_filter_func()' is not supported in expression: " + << this->debug_string(); + return nullptr; } virtual std::shared_ptr get_set_func() const { return nullptr; } // If this expr is a BitmapPredicate, this method will return a BitmapFilterFunc virtual std::shared_ptr get_bitmap_filter_func() const { - throw Exception(Status::FatalError( - "Method 'get_bitmap_filter_func()' is not supported in expression: {}", - this->debug_string())); + LOG(FATAL) << "Method 'get_bitmap_filter_func()' is not supported in expression: " + << this->debug_string(); + return nullptr; } // fast_execute can direct copy expr filter result which build by apply index in segment_iterator diff --git a/be/src/vec/functions/array/function_array_apply.cpp b/be/src/vec/functions/array/function_array_apply.cpp index 4161441080aac0..75425389dd975c 100644 --- a/be/src/vec/functions/array/function_array_apply.cpp +++ b/be/src/vec/functions/array/function_array_apply.cpp @@ -24,7 +24,6 @@ #include #include -#include "common/exception.h" #include "common/status.h" #include "runtime/thread_context.h" #include "vec/aggregate_functions/aggregate_function.h" @@ -131,7 +130,8 @@ class FunctionArrayApply : public IFunction { if constexpr (op == ApplyOp::GE) { return data >= comp; } - throw Exception(Status::FatalError("__builtin_unreachable")); + LOG(FATAL) << "__builtin_unreachable"; + __builtin_unreachable(); } // need exception safety diff --git a/be/src/vec/functions/function_cast.h b/be/src/vec/functions/function_cast.h index af9e9d19267073..48619ff85f83c8 100644 --- a/be/src/vec/functions/function_cast.h +++ b/be/src/vec/functions/function_cast.h @@ -665,14 +665,7 @@ struct ConvertImplNumberToJsonb { } else if constexpr (std::is_same_v) { writer.writeDouble(data[i]); } else { - static_assert(std::is_same_v || - std::is_same_v || - std::is_same_v || - std::is_same_v || - std::is_same_v || - std::is_same_v || - std::is_same_v, - "unsupported type"); + LOG(FATAL) << "unsupported type "; __builtin_unreachable(); } column_string->insert_data(writer.getOutput()->getBuffer(), @@ -957,7 +950,8 @@ struct ConvertImplFromJsonb { res[i] = 0; } } else { - throw Exception(Status::FatalError("unsupported type")); + LOG(FATAL) << "unsupported type "; + __builtin_unreachable(); } } diff --git a/be/src/vec/json/simd_json_parser.h b/be/src/vec/json/simd_json_parser.h index 79924a12a3a4ff..5189e93563cc52 100644 --- a/be/src/vec/json/simd_json_parser.h +++ b/be/src/vec/json/simd_json_parser.h @@ -208,8 +208,8 @@ class SimdJSONParser { /// Optional: Allocates memory to parse JSON documents faster. void reserve(size_t max_size) { if (parser.allocate(max_size) != simdjson::error_code::SUCCESS) { - throw Exception(Status::FatalError("Couldn't allocate {} bytes when parsing JSON", - std::to_string(max_size))); + LOG(FATAL) << "Couldn't allocate " + std::to_string(max_size) + + " bytes when parsing JSON"; } } diff --git a/be/src/vec/olap/olap_data_convertor.h b/be/src/vec/olap/olap_data_convertor.h index 75aff7dfec34cd..3473d9d26b5205 100644 --- a/be/src/vec/olap/olap_data_convertor.h +++ b/be/src/vec/olap/olap_data_convertor.h @@ -455,8 +455,7 @@ class OlapBlockDataConvertor { const void* get_data() const override { return _results.data(); }; const void* get_data_at(size_t offset) const override { - throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, - "now not support get_data_at for OlapColumnDataConvertorArray"); + LOG(FATAL) << "now not support get_data_at for OlapColumnDataConvertorArray"; __builtin_unreachable(); }; Status convert_to_olap() override; @@ -485,8 +484,7 @@ class OlapBlockDataConvertor { Status convert_to_olap() override; const void* get_data() const override { return _results.data(); }; const void* get_data_at(size_t offset) const override { - throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, - "now not support get_data_at for OlapColumnDataConvertorMap"); + LOG(FATAL) << "now not support get_data_at for OlapColumnDataConvertorMap"; __builtin_unreachable(); }; diff --git a/be/src/vec/runtime/vdatetime_value.cpp b/be/src/vec/runtime/vdatetime_value.cpp index 026648319d4be4..86c50f0936f30d 100644 --- a/be/src/vec/runtime/vdatetime_value.cpp +++ b/be/src/vec/runtime/vdatetime_value.cpp @@ -3434,7 +3434,8 @@ void DateV2Value::unchecked_set_time(uint8_t hour, uint8_t minute, uint16_t s date_v2_value_.second_ = second; date_v2_value_.microsecond_ = microsecond; } else { - throw Exception(Status::FatalError("Invalid operation 'set_time' for date!")); + LOG(FATAL) << "Invalid operation 'set_time' for date!"; + __builtin_unreachable(); } } @@ -3443,7 +3444,8 @@ void DateV2Value::set_microsecond(uint64_t microsecond) { if constexpr (is_datetime) { date_v2_value_.microsecond_ = microsecond; } else { - throw Exception(Status::FatalError("Invalid operation 'set_microsecond' for date!")); + LOG(FATAL) << "Invalid operation 'set_microsecond' for date!"; + __builtin_unreachable(); } } diff --git a/be/test/util/threadpool_test.cpp b/be/test/util/threadpool_test.cpp index d331bd0d2ac25d..3859639539dbb7 100644 --- a/be/test/util/threadpool_test.cpp +++ b/be/test/util/threadpool_test.cpp @@ -42,7 +42,6 @@ #include "common/logging.h" #include "common/status.h" -#include "gtest/gtest.h" #include "gtest/gtest_pred_impl.h" #include "gutil/strings/substitute.h" #include "util/barrier.h"