Yingchun Lai has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/18679 )

Change subject: [master] support enable/disable auto rebalancer online
......................................................................


Patch Set 9:

(7 comments)

http://gerrit.cloudera.org:8080/#/c/18679/9//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/18679/9//COMMIT_MSG@7
PS9, Line 7: enable/disable
to turn on/off


http://gerrit.cloudera.org:8080/#/c/18679/9//COMMIT_MSG@7
PS9, Line 7: online
at runtime


http://gerrit.cloudera.org:8080/#/c/18679/9//COMMIT_MSG@10
PS9, Line 10: starting
Kudu master starting.


http://gerrit.cloudera.org:8080/#/c/18679/9//COMMIT_MSG@12
PS9, Line 12: We can support
This patch supports


http://gerrit.cloudera.org:8080/#/c/18679/9//COMMIT_MSG@12
PS9, Line 12: auto_rebalancing_enabled
gflag --auto_rebalancing_enabled


http://gerrit.cloudera.org:8080/#/c/18679/9/src/kudu/master/auto_rebalancer.cc
File src/kudu/master/auto_rebalancer.cc:

http://gerrit.cloudera.org:8080/#/c/18679/9/src/kudu/master/auto_rebalancer.cc@192
PS9, Line 192:     return thread_token_->Schedule([this]() { this->RunLoop(); },
If the task has been put into thread_token_, even if we set 
--auto_rebalancing_enabled to false, it will not take effect, right? The task 
will be scheduled on time (e.g. after 1 hour, if 
--auto_rebalancing_interval_seconds=3600) ?


http://gerrit.cloudera.org:8080/#/c/18679/9/src/kudu/master/auto_rebalancer.cc@199
PS9, Line 199:   if (!FLAGS_auto_rebalancing_enabled) {
Can we implement it like:

int64_t last_scheduled = 0;
while (shutdown_.WaitFor(MonoDelta::FromSeconds(1))) {
  if (!FLAGS_auto_rebalancing_enabled || now() - last_scheduled < 
FLAGS_auto_rebalancing_interval_seconds) {
    continue;
  }
  ...
  ReplicaRebalance();
  last_scheduled = now();
  ...
}



--
To view, visit http://gerrit.cloudera.org:8080/18679
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifbcea6392b783843f89e019f1141dd8905366de5
Gerrit-Change-Number: 18679
Gerrit-PatchSet: 9
Gerrit-Owner: Yuqi Du <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yingchun Lai <[email protected]>
Gerrit-Reviewer: Yuqi Du <[email protected]>
Gerrit-Comment-Date: Fri, 08 Jul 2022 09:41:08 +0000
Gerrit-HasComments: Yes

Reply via email to