This is an automated email from the ASF dual-hosted git repository.
gavinchou pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new aaaf59fe4bb branch-3.0: [Chore](load) print error url to the log when
encountering data quality issues during load #45212 (#45320)
aaaf59fe4bb is described below
commit aaaf59fe4bbae624082323c91ef3d98258449090
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Dec 19 02:04:24 2024 +0800
branch-3.0: [Chore](load) print error url to the log when encountering data
quality issues during load #45212 (#45320)
Cherry-picked from #45212
Co-authored-by: Xin Liao <[email protected]>
---
be/src/http/action/stream_load.cpp | 3 ++-
be/src/runtime/fragment_mgr.cpp | 14 +++++++++++---
be/src/runtime/runtime_state.cpp | 4 +++-
.../src/main/java/org/apache/doris/qe/Coordinator.java | 1 +
4 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/be/src/http/action/stream_load.cpp
b/be/src/http/action/stream_load.cpp
index e3ad7f44866..117c6eaa981 100644
--- a/be/src/http/action/stream_load.cpp
+++ b/be/src/http/action/stream_load.cpp
@@ -145,7 +145,8 @@ void StreamLoadAction::handle(HttpRequest* req) {
<< ctx->commit_and_publish_txn_cost_nanos / 1000000
<< ", number_total_rows=" << ctx->number_total_rows
<< ", number_loaded_rows=" << ctx->number_loaded_rows
- << ", receive_bytes=" << ctx->receive_bytes << ", loaded_bytes="
<< ctx->loaded_bytes;
+ << ", receive_bytes=" << ctx->receive_bytes << ", loaded_bytes="
<< ctx->loaded_bytes
+ << ", error_url=" << ctx->error_url;
// update statistics
streaming_load_requests_total->increment(1);
diff --git a/be/src/runtime/fragment_mgr.cpp b/be/src/runtime/fragment_mgr.cpp
index a5392276282..c3d4341e5ea 100644
--- a/be/src/runtime/fragment_mgr.cpp
+++ b/be/src/runtime/fragment_mgr.cpp
@@ -427,12 +427,20 @@ void FragmentMgr::coordinator_callback(const
ReportStatusRequest& req) {
params.load_counters.emplace(s_unselected_rows,
std::to_string(num_rows_load_unselected));
if (!req.runtime_state->get_error_log_file_path().empty()) {
- params.__set_tracking_url(
-
to_load_error_http_path(req.runtime_state->get_error_log_file_path()));
+ std::string error_log_url =
+
to_load_error_http_path(req.runtime_state->get_error_log_file_path());
+ LOG(INFO) << "error log file path: " << error_log_url
+ << ", query id: " << print_id(req.query_id)
+ << ", fragment instance id: " <<
print_id(req.fragment_instance_id);
+ params.__set_tracking_url(error_log_url);
} else if (!req.runtime_states.empty()) {
for (auto* rs : req.runtime_states) {
if (!rs->get_error_log_file_path().empty()) {
-
params.__set_tracking_url(to_load_error_http_path(rs->get_error_log_file_path()));
+ std::string error_log_url =
to_load_error_http_path(rs->get_error_log_file_path());
+ LOG(INFO) << "error log file path: " << error_log_url
+ << ", query id: " << print_id(req.query_id)
+ << ", fragment instance id: " <<
print_id(rs->fragment_instance_id());
+ params.__set_tracking_url(error_log_url);
}
if (rs->wal_id() > 0) {
params.__set_txn_id(rs->wal_id());
diff --git a/be/src/runtime/runtime_state.cpp b/be/src/runtime/runtime_state.cpp
index f6f70f5c679..a22ad18ce04 100644
--- a/be/src/runtime/runtime_state.cpp
+++ b/be/src/runtime/runtime_state.cpp
@@ -376,7 +376,9 @@ Status RuntimeState::create_error_log_file() {
LOG(WARNING) << error_msg.str();
return Status::InternalError(error_msg.str());
}
- VLOG_FILE << "create error log file: " << _error_log_file_path;
+ LOG(INFO) << "create error log file: " << _error_log_file_path
+ << ", query id: " << print_id(_query_id)
+ << ", fragment instance id: " << print_id(_fragment_instance_id);
return Status::OK();
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java
b/fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java
index 2889e943e93..ae68f64d75f 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java
@@ -2413,6 +2413,7 @@ public class Coordinator implements CoordInterface {
updateLoadCounters(params.getLoadCounters());
}
if (params.isSetTrackingUrl()) {
+ LOG.info("query_id={} tracking_url: {}",
DebugUtil.printId(queryId), params.getTrackingUrl());
trackingUrl = params.getTrackingUrl();
}
if (params.isSetTxnId()) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]