Skip to content

Commit

Permalink
fix meta follower read remaining jobs (#3347)
Browse files Browse the repository at this point in the history
  • Loading branch information
liwenhui-soul authored Nov 24, 2021
1 parent b7c6901 commit 683f773
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/meta/processors/job/JobManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ JobManager::~JobManager() { shutDown(); }
nebula::cpp2::ErrorCode JobManager::handleRemainingJobs() {
std::unique_ptr<kvstore::KVIterator> iter;
auto retCode = kvStore_->prefix(kDefaultSpaceId, kDefaultPartId, JobUtil::jobPrefix(), &iter);
if (retCode == nebula::cpp2::ErrorCode::E_LEADER_CHANGED) {
LOG(INFO) << "Not leader, skip reading remaining jobs";
return nebula::cpp2::ErrorCode::SUCCEEDED;
}
if (retCode != nebula::cpp2::ErrorCode::SUCCEEDED) {
LOG(ERROR) << "Can't find jobs, error: " << apache::thrift::util::enumNameSafe(retCode);
return retCode;
Expand Down

0 comments on commit 683f773

Please sign in to comment.