Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix stop job error code #5233

Merged
merged 2 commits into from
Jan 11, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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