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

Balance fix #3668

Merged
merged 7 commits into from
Jan 20, 2022
Merged
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
Next Next commit
fix core balance in zone removing the only host in zone
liwenhui-soul committed Jan 20, 2022
commit e9e8efb5657068bbaf86dd546ed3582f50b8bee4
3 changes: 3 additions & 0 deletions src/meta/processors/job/DataBalanceJobExecutor.cpp
Original file line number Diff line number Diff line change
@@ -69,6 +69,9 @@ Status DataBalanceJobExecutor::buildBalancePlan() {
const std::string& zoneName = zoneHostEntry.first;
std::vector<Host*>& lostHostVec = zoneHostEntry.second;
std::vector<Host*>& activeVec = activeSortedHost[zoneName];
if (activeVec.size() == 0) {
return Status::Error("zone %s has no host", zoneName.c_str());
}
for (Host* host : lostHostVec) {
for (PartitionID partId : host->parts_) {
Host* dstHost = activeVec.front();