From 849ed6f4714e64caf55533a2109b9e7d4917e08b Mon Sep 17 00:00:00 2001 From: jievince <38901892+jievince@users.noreply.github.com> Date: Thu, 29 Dec 2022 11:28:42 +0800 Subject: [PATCH] fix error msg trancated --- src/graph/service/QueryInstance.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/graph/service/QueryInstance.cpp b/src/graph/service/QueryInstance.cpp index d878a49f4e9..16ebf4747b5 100644 --- a/src/graph/service/QueryInstance.cpp +++ b/src/graph/service/QueryInstance.cpp @@ -93,9 +93,7 @@ Status QueryInstance::validateAndOptimize() { // Optimize the query, and get the execution plan. We should not pass the optimizer errors to user // since the message is often not easy to understand. Logging them is enough. if (auto status = findBestPlan(); !status.ok()) { - return Status::Error("Error found in optimization stage for query: %s, error: %s", - rctx->query().c_str(), - status.message().c_str()); + return Status::Error("Error found in optimization stage: %s", status.toString().c_str()); } stats::StatsManager::addValue(kOptimizerLatencyUs, *(qctx_->plan()->optimizeTimeInUs())); if (FLAGS_enable_space_level_metrics && spaceName != "") { @@ -139,8 +137,8 @@ void QueryInstance::onFinish() { } void QueryInstance::onError(Status status) { - LOG(ERROR) << status; auto *rctx = qctx()->rctx(); + LOG(ERROR) << status << ", query: " << rctx->query(); auto &spaceName = rctx->session()->space().name; switch (status.code()) { case Status::Code::kOk: