Marton Greber has posted comments on this change. ( http://gerrit.cloudera.org:8080/24946 )
Change subject: KUDU-3733 run auto-leader-rebalancer at startup ...................................................................... Patch Set 3: Code-Review+1 (1 comment) Just one more question. Otherwise looks good. http://gerrit.cloudera.org:8080/#/c/24946/3/src/kudu/master/auto_leader_rebalancer.cc File src/kudu/master/auto_leader_rebalancer.cc: http://gerrit.cloudera.org:8080/#/c/24946/3/src/kudu/master/auto_leader_rebalancer.cc@1001 PS3, Line 1001: if (shutdown_.WaitFor(std::min(MonoDelta::FromSeconds(kPollIntervalSecs), interval))) { The fine poll is only needed while we're waiting to acquire (or re-acquire) leadership. Once a pass has run and we're the steady-state leader, we already know the next pass is due at last_run_time + interval, yet we still wake every kPollIntervalSecs just to find pass_is_due == false and sleep again (~720 wakeups/hour at the default). Could the wait be min(poll, time_until_due) instead -- poll finely only when !pass_is_due for leadership reasons, and otherwise sleep until the pass is actually due? Per-wake cost is trivial so this isn't blocking; mostly asking whether the uniform poll is the intended shape or just the simplest one. -- 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: comment Gerrit-Change-Id: I3c1b2a5622578c14a414fc79e4c527f9f7efbbce Gerrit-Change-Number: 24946 Gerrit-PatchSet: 3 Gerrit-Owner: Gabriella Lotz <[email protected]> Gerrit-Reviewer: Gabriella Lotz <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Marton Greber <[email protected]> Gerrit-Reviewer: Zoltan Chovan <[email protected]> Gerrit-Comment-Date: Tue, 06 Oct 2026 16:27:02 +0000 Gerrit-HasComments: Yes
