imay closed pull request #424: Fix bug that load error log is empty sometimes
URL: https://github.com/apache/incubator-doris/pull/424
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/be/src/runtime/runtime_state.cpp b/be/src/runtime/runtime_state.cpp
index a9cef440..bb9a49bc 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 02e670e7..7786722a 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,
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]