Skip to content

Commit

Permalink
fix meta follower read remaining jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
liwenhui-soul committed Nov 24, 2021
1 parent b7c6901 commit 8ef8f3d
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 8ef8f3d

Please sign in to comment.