Skip to content

Commit

Permalink
fix error code (vesoft-inc#5233)
Browse files Browse the repository at this point in the history
Co-authored-by: Sophie <[email protected]>
  • Loading branch information
SuperYoko and Sophie-Xie authored Jan 11, 2023
1 parent 4015b39 commit 9c1ff89
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/meta/processors/job/RebuildJobExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/meta/processors/job/StatsJobExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9c1ff89

Please sign in to comment.