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

luminous: mds: MDBalancer::try_rebalance() may stop prematurely #23884

Merged
merged 2 commits into from Sep 19, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/mds/MDBalancer.cc
Expand Up @@ -874,10 +874,10 @@ void MDBalancer::try_rebalance(balance_state_t& state)
mds_rank_t target = it.first;
double amount = it.second;

if (amount / target_load < .2)
continue;
if (amount < MIN_OFFLOAD)
continue;
if (amount * 10 * state.targets.size() < target_load)
continue;

dout(5) << "want to send " << amount << " to mds." << target
//<< " .. " << (*it).second << " * " << load_fac
Expand Down Expand Up @@ -1148,7 +1148,9 @@ void MDBalancer::maybe_fragment(CDir *dir, bool hot)
{
// split/merge
if (g_conf->mds_bal_frag && bal_fragment_interval > 0 &&
dir->is_auth() && !dir->inode->is_base()) { // not root/base (for now at least)
dir->is_auth() &&
!dir->inode->is_base() && // not root/base (for now at least)
!dir->inode->is_stray()) { // not straydir

// split
if (g_conf->mds_bal_split_size > 0 &&
Expand Down