diff --git a/be/src/runtime/runtime_state.cpp b/be/src/runtime/runtime_state.cpp index a9cef4407b..bb9a49bccf 100644 --- a/be/src/runtime/runtime_state.cpp +++ b/be/src/runtime/runtime_state.cpp @@ -46,30 +46,6 @@ namespace doris { -RuntimeState::RuntimeState( - const TUniqueId& fragment_instance_id, - const TQueryOptions& query_options, - const std::string& now, ExecEnv* exec_env) : - _obj_pool(new ObjectPool()), - _data_stream_recvrs_pool(new ObjectPool()), - _unreported_error_idx(0), - _profile(_obj_pool.get(), "Fragment " + print_id(fragment_instance_id)), - _fragment_mem_tracker(NULL), - _is_cancelled(false), - _per_fragment_instance_idx(0), - _root_node_id(-1), - _num_rows_load_success(0), - _num_rows_load_filtered(0), - _num_print_error_rows(0), - _normal_row_number(0), - _error_row_number(0), - _error_log_file(nullptr), - _is_running(true), - _instance_buffer_reservation(new ReservationTracker) { - Status status = init(fragment_instance_id, query_options, now, exec_env); - DCHECK(status.ok()); -} - RuntimeState::RuntimeState( const TExecPlanFragmentParams& fragment_params, const TQueryOptions& query_options, @@ -86,6 +62,7 @@ RuntimeState::RuntimeState( _root_node_id(-1), _num_rows_load_success(0), _num_rows_load_filtered(0), + _num_print_error_rows(0), _normal_row_number(0), _error_row_number(0), _error_log_file(nullptr), @@ -431,7 +408,10 @@ void RuntimeState::append_error_msg_to_file( } } - if (_num_print_error_rows.fetch_add(1, std::memory_order_relaxed) > MAX_ERROR_NUM) { + // if num of printed error row exceeds the limit, and this is not a summary message, + // return + if (_num_print_error_rows.fetch_add(1, std::memory_order_relaxed) > MAX_ERROR_NUM + && !line.empty()) { return; } diff --git a/be/src/runtime/runtime_state.h b/be/src/runtime/runtime_state.h index 02e670e768..7786722aa5 100644 --- a/be/src/runtime/runtime_state.h +++ b/be/src/runtime/runtime_state.h @@ -65,9 +65,6 @@ class RowDescriptor; // query and shared across all execution nodes of that query. class RuntimeState { public: - RuntimeState(const TUniqueId& fragment_instance_id, - const TQueryOptions& query_options, - const std::string& now, ExecEnv* exec_env); RuntimeState( const TExecPlanFragmentParams& fragment_params,