Skip to content

Commit

Permalink
unify leader change and machine not found (vesoft-inc#4022)
Browse files Browse the repository at this point in the history
Co-authored-by: Sophie <[email protected]>
  • Loading branch information
2 people authored and Aiee committed Mar 14, 2022
1 parent db575a8 commit dc7e382
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/clients/meta/MetaClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,8 @@ void MetaClient::getResponse(Request req,
// succeeded
pro.setValue(respGen(std::move(resp)));
return;
} else if (code == nebula::cpp2::ErrorCode::E_LEADER_CHANGED) {
} else if (code == nebula::cpp2::ErrorCode::E_LEADER_CHANGED ||
code == nebula::cpp2::ErrorCode::E_MACHINE_NOT_FOUND) {
updateLeader(resp.get_leader());
if (retry < retryLimit) {
evb->runAfterDelay(
Expand All @@ -772,8 +773,6 @@ void MetaClient::getResponse(Request req,
} else if (code == nebula::cpp2::ErrorCode::E_CLIENT_SERVER_INCOMPATIBLE) {
pro.setValue(respGen(std::move(resp)));
return;
} else if (resp.get_code() == nebula::cpp2::ErrorCode::E_MACHINE_NOT_FOUND) {
updateLeader();
}
pro.setValue(this->handleResponse(resp));
}); // then
Expand Down

0 comments on commit dc7e382

Please sign in to comment.