Skip to content

Commit

Permalink
ducky/partition_balancer_test: fix full_node_test
Browse files Browse the repository at this point in the history
Disable leader balancer after partition balancer has finished its work,
because leadership transfers will create new segments that can cause disk
usage to go over limit again even after we've verified that everything
is stable.

Fixes redpanda-data#9788

(cherry picked from commit f0e69dd)
  • Loading branch information
ztlpn authored and vbotbuildovich committed Sep 28, 2023
1 parent aa4dbb2 commit 1ef9646
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/rptest/tests/partition_balancer_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,12 @@ def is_ready_and_stable(s):
nonlocal ready_appeared_at
if s["status"] == "ready":
if ready_appeared_at is None:
# Disable leader balancer after partition balancer has finished its work,
# because leadership transfers will create new segments that can cause disk
# usage to go over limit again even after we've verified that everything
# is stable.
self.redpanda.set_cluster_config(
{"enable_leader_balancer": False})
ready_appeared_at = time.time()
else:
# ready status is stable for 11 seconds, should be enough for 3 ticks to pass
Expand Down

0 comments on commit 1ef9646

Please sign in to comment.