[enhancement](query exec) should print error status when query meet error (#18247)

If BE is in heavy load, the query may failed, but BE will try to connect to FE using thrift, if FE is also in heavy load the thrift connection will failed. And the status is rewritten at line 342, and the actual failure reason for the query is lost. Should print the error status every time during update.
Co-authored-by: yiguolei <yiguolei@gmail.com>
This commit is contained in:
yiguolei
2023-03-31 14:08:24 +08:00
committed by GitHub
parent 1a56c56e90
commit 1027abe0d3

View File

@ -110,6 +110,9 @@ public:
std::lock_guard<std::mutex> l(_status_lock);
if (!status.ok() && _exec_status.ok()) {
_exec_status = status;
LOG(WARNING) << "query_id=" << print_id(_query_id)
<< ", instance_id=" << print_id(_fragment_instance_id)
<< " meet error status " << status;
}
return _exec_status;
}
@ -331,7 +334,6 @@ std::string FragmentMgr::to_http_path(const std::string& file_name) {
void FragmentMgr::coordinator_callback(const ReportStatusRequest& req) {
DCHECK(req.status.ok() || req.done); // if !status.ok() => done
Status exec_status = req.update_fn(req.status);
Status coord_status;
FrontendServiceConnection coord(_exec_env->frontend_client_cache(), req.coord_addr,
&coord_status);