This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-1.1-lts
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-1.1-lts by this push:
     new 2d1316bfd1 (runtime) log status via to_string (#12560)
2d1316bfd1 is described below

commit 2d1316bfd14d85d6fe6359bfaed233245c353fad
Author: Yongqiang YANG <98214048+dataroar...@users.noreply.github.com>
AuthorDate: Wed Sep 14 09:10:39 2022 +0800

    (runtime) log status via to_string (#12560)
    
    Status is treated as bool when we log it via operator << due to
    Status::bool() method.
---
 be/src/agent/task_worker_pool.cpp | 4 ++--
 be/src/runtime/fragment_mgr.cpp   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/be/src/agent/task_worker_pool.cpp 
b/be/src/agent/task_worker_pool.cpp
index 55f3a786d9..cb78c3beb6 100644
--- a/be/src/agent/task_worker_pool.cpp
+++ b/be/src/agent/task_worker_pool.cpp
@@ -663,7 +663,7 @@ void TaskWorkerPool::_push_worker_thread_callback() {
             task_status.__set_status_code(TStatusCode::OK);
             finish_task_request.__set_finish_tablet_infos(tablet_infos);
         } else {
-            LOG(WARNING) << "push failed, error_code: " << status
+            LOG(WARNING) << "push failed, error_code: " << status.to_string()
                          << ", signature: " << agent_task_req.signature;
             error_msgs.push_back("push failed");
             task_status.__set_status_code(TStatusCode::RUNTIME_ERROR);
@@ -1595,7 +1595,7 @@ void TaskWorkerPool::_handle_report(TReportRequest& 
request, ReportType type) {
     Status status = _master_client->report(request, &result);
     bool is_report_success = false;
     if (!status.ok()) {
-        LOG(WARNING) << "report " << TYPE_STRING(type) << " failed. status: " 
<< status
+        LOG(WARNING) << "report " << TYPE_STRING(type) << " failed. status: " 
<< status.to_string()
                      << ", master host: " << 
_master_info.network_address.hostname
                      << ", port:" << _master_info.network_address.port;
     } else if (result.status.status_code != TStatusCode::OK) {
diff --git a/be/src/runtime/fragment_mgr.cpp b/be/src/runtime/fragment_mgr.cpp
index 3612ce2479..b45ef9b1ee 100644
--- a/be/src/runtime/fragment_mgr.cpp
+++ b/be/src/runtime/fragment_mgr.cpp
@@ -290,7 +290,7 @@ void FragmentExecState::coordinator_callback(const Status& 
status, RuntimeProfil
     FrontendServiceConnection coord(_exec_env->frontend_client_cache(), 
_coord_addr, &coord_status);
     if (!coord_status.ok()) {
         std::stringstream ss;
-        ss << "couldn't get a client for " << _coord_addr << ", reason: " << 
coord_status;
+        ss << "couldn't get a client for " << _coord_addr << ", reason: " << 
coord_status.to_string();
         LOG(WARNING) << "query_id: " << _query_id << ", " << ss.str();
         update_status(Status::InternalError(ss.str()));
         return;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to