Skip to content

Commit

Permalink
Merge pull request #20194 from xiexingguo/wip-badsteps
Browse files Browse the repository at this point in the history
pybind/mgr/balancer: increase bad_steps properly

Reviewed-by: Sage Weil <sage@redhat.com>
  • Loading branch information
tchaikov committed Feb 2, 2018
2 parents 85fe7ef + 47d1eb3 commit 43a2b00
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/pybind/mgr/balancer/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,7 @@ def do_crush_compat(self, plan):
next_misplaced, max_misplaced, step)
else:
if next_pe.score > best_pe.score * 1.0001:
bad_steps += 1
if bad_steps < 5 and random.randint(0, 100) < 70:
self.log.debug('Score got worse, taking another step')
else:
Expand Down

0 comments on commit 43a2b00

Please sign in to comment.