Skip to content

Commit

Permalink
fix error msg trancated (vesoft-inc#2056)
Browse files Browse the repository at this point in the history
Co-authored-by: Sophie <[email protected]>
Co-authored-by: codesigner <[email protected]>

Co-authored-by: jie.wang <[email protected]>
Co-authored-by: Sophie <[email protected]>
Co-authored-by: codesigner <[email protected]>
  • Loading branch information
4 people authored Dec 29, 2022
1 parent aa105d5 commit 16898e5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/graph/service/QueryInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,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 != "") {
Expand Down Expand Up @@ -176,8 +174,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:
Expand Down

0 comments on commit 16898e5

Please sign in to comment.