From 9c1ff895cb14d928ad899c52662395add8bde7ff Mon Sep 17 00:00:00 2001 From: Alex Xing <90179377+SuperYoko@users.noreply.github.com> Date: Wed, 11 Jan 2023 14:41:37 +0800 Subject: [PATCH] fix error code (#5233) Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> --- src/meta/processors/job/RebuildJobExecutor.cpp | 4 ++-- src/meta/processors/job/StatsJobExecutor.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/meta/processors/job/RebuildJobExecutor.cpp b/src/meta/processors/job/RebuildJobExecutor.cpp index 0627416b820..a485144151c 100644 --- a/src/meta/processors/job/RebuildJobExecutor.cpp +++ b/src/meta/processors/job/RebuildJobExecutor.cpp @@ -64,12 +64,12 @@ nebula::cpp2::ErrorCode RebuildJobExecutor::stop() { auto tries = folly::collectAll(std::move(futures)).get(); if (std::any_of(tries.begin(), tries.end(), [](auto& t) { return t.hasException(); })) { LOG(INFO) << "RebuildJobExecutor::stop() RPC failure."; - return nebula::cpp2::ErrorCode::E_BALANCER_FAILURE; + return nebula::cpp2::ErrorCode::E_RPC_FAILURE; } for (const auto& t : tries) { if (!t.value().ok()) { LOG(INFO) << "Stop Build Index Failed"; - return nebula::cpp2::ErrorCode::E_BALANCER_FAILURE; + return nebula::cpp2::ErrorCode::E_RPC_FAILURE; } } return nebula::cpp2::ErrorCode::SUCCEEDED; diff --git a/src/meta/processors/job/StatsJobExecutor.cpp b/src/meta/processors/job/StatsJobExecutor.cpp index b381172d5b1..4d6aa26c413 100644 --- a/src/meta/processors/job/StatsJobExecutor.cpp +++ b/src/meta/processors/job/StatsJobExecutor.cpp @@ -198,13 +198,13 @@ nebula::cpp2::ErrorCode StatsJobExecutor::stop() { auto tries = folly::collectAll(std::move(futures)).get(); if (std::any_of(tries.begin(), tries.end(), [](auto& t) { return t.hasException(); })) { LOG(INFO) << "stats job stop() RPC failure."; - return nebula::cpp2::ErrorCode::E_BALANCER_FAILURE; + return nebula::cpp2::ErrorCode::E_RPC_FAILURE; } for (const auto& t : tries) { if (!t.value().ok()) { LOG(INFO) << "Stop stats job Failed"; - return nebula::cpp2::ErrorCode::E_BALANCER_FAILURE; + return nebula::cpp2::ErrorCode::E_RPC_FAILURE; } } return nebula::cpp2::ErrorCode::SUCCEEDED;