Yingchun Lai has posted comments on this change. ( http://gerrit.cloudera.org:8080/18679 )
Change subject: [master] support turn on/off auto rebalancer at runtime ...................................................................... Patch Set 20: (7 comments) http://gerrit.cloudera.org:8080/#/c/18679/20/src/kudu/master/auto_rebalancer.h File src/kudu/master/auto_rebalancer.h: http://gerrit.cloudera.org:8080/#/c/18679/20/src/kudu/master/auto_rebalancer.h@81 PS20, Line 81: Status NextRebalance(); : : Status ReplicaRebalance(); : : // Runs the main loop of the auto-rebalancing thread. : void Rebalance(); The 3 function names really puzzled me a bit :) http://gerrit.cloudera.org:8080/#/c/18679/20/src/kudu/master/auto_rebalancer.h@179 PS20, Line 179: Running nit: running http://gerrit.cloudera.org:8080/#/c/18679/20/src/kudu/master/auto_rebalancer.cc File src/kudu/master/auto_rebalancer.cc: http://gerrit.cloudera.org:8080/#/c/18679/20/src/kudu/master/auto_rebalancer.cc@179 PS20, Line 179: kudu:: nit: can be omitted? http://gerrit.cloudera.org:8080/#/c/18679/20/src/kudu/master/auto_rebalancer.cc@191 PS20, Line 191: if (thread_token_) { : delete thread_token_; : thread_token_ = nullptr; : } why not use unique_ptr? http://gerrit.cloudera.org:8080/#/c/18679/20/src/kudu/master/auto_rebalancer.cc@228 PS20, Line 228: More than two threads can run the function, we should pretect it. 'SERIAL type token tasks are run one at a time', how the situation you described happen? http://gerrit.cloudera.org:8080/#/c/18679/20/src/kudu/master/catalog_manager.h File src/kudu/master/catalog_manager.h: http://gerrit.cloudera.org:8080/#/c/18679/20/src/kudu/master/catalog_manager.h@1254 PS20, Line 1254: std::unique_ptr<ThreadPool> scheduler_pool_; nit: Add some description what does this pool do. http://gerrit.cloudera.org:8080/#/c/18679/20/src/kudu/util/threadpool-test.cc File src/kudu/util/threadpool-test.cc: http://gerrit.cloudera.org:8080/#/c/18679/20/src/kudu/util/threadpool-test.cc@198 PS20, Line 198: remove these meanless blank lines -- 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: 20 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: Wed, 27 Jul 2022 04:14:12 +0000 Gerrit-HasComments: Yes
