Gabriella Lotz has uploaded this change for review. ( http://gerrit.cloudera.org:8080/24946
Change subject: KUDU-3733 run auto-leader-rebalancer at startup, not an interval later ...................................................................... KUDU-3733 run auto-leader-rebalancer at startup, not an interval later RunLoop() slept for --auto_leader_rebalancing_interval_seconds before its first pass, leaving the auto-leader-rebalancer idle for up to an hour after master startup or failover. Running a pass immediately isn't enough on its own: the thread is created while the catalog manager is still initializing, so that pass no-ops on the leadership check and the loop sleeps out the interval anyway. The interval says how often to rebalance, not how long to sleep, so separate the two. The loop now polls every 5 seconds and decides whether a pass is due from when the last one ran; only a pass that got past the leadership check advances that timestamp. Adds LeaderRebalancerTest.FirstPassDoesNotWaitOutFullInterval, which fails against the old loop. Change-Id: I3c1b2a5622578c14a414fc79e4c527f9f7efbbce --- M src/kudu/master/auto_leader_rebalancer-test.cc M src/kudu/master/auto_leader_rebalancer.cc M src/kudu/master/auto_leader_rebalancer.h 3 files changed, 63 insertions(+), 8 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/46/24946/1 -- To view, visit http://gerrit.cloudera.org:8080/24946 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I3c1b2a5622578c14a414fc79e4c527f9f7efbbce Gerrit-Change-Number: 24946 Gerrit-PatchSet: 1 Gerrit-Owner: Gabriella Lotz <[email protected]>
