Yingchun Lai has posted comments on this change. ( http://gerrit.cloudera.org:8080/18454 )
Change subject: [master] KUDU-3390 support auto rebalance tablet leaders across TServers ...................................................................... Patch Set 29: (6 comments) http://gerrit.cloudera.org:8080/#/c/18454/29/src/kudu/master/auto_leader_rebalancer.cc File src/kudu/master/auto_leader_rebalancer.cc: http://gerrit.cloudera.org:8080/#/c/18454/29/src/kudu/master/auto_leader_rebalancer.cc@107 PS29, Line 107: Status AutoLeaderRebalancerTask::RunLeaderRebalanceForTable( Logs in this function add the table name to distinguish different tables are operated. http://gerrit.cloudera.org:8080/#/c/18454/29/src/kudu/master/auto_leader_rebalancer.cc@157 PS29, Line 157: auto& leader_uuids = LookupOrInsert(&uuid_leaders_map, uuid, vector<string>()); : leader_uuids.emplace_back(tablet->id()); nit: InsertOrDie(&uuid_leaders_map, uuid, vector<string>(tablet->id())); ? http://gerrit.cloudera.org:8080/#/c/18454/29/src/kudu/master/auto_leader_rebalancer.cc@159 PS29, Line 159: leader_uuid_map.insert({tablet->id(), uuid}); : leader_uuid_host_port_map.insert({uuid, HostPortFromPB(ts_info.rpc_addresses(0))}); nit: Recommand to use InsertOrDie http://gerrit.cloudera.org:8080/#/c/18454/29/src/kudu/master/auto_leader_rebalancer.cc@165 PS29, Line 165: VLOG(0) << Substitute("Not a VOTER, role: $0", RaftPeerPB::Role_Name(r.role())); Maybe it's a warning or even fatal? http://gerrit.cloudera.org:8080/#/c/18454/29/src/kudu/master/auto_leader_rebalancer.cc@181 PS29, Line 181: uint32_t replica_count = 0; : auto iter1 = uuid_replicas_map.find(uuid); : if (iter1 != uuid_replicas_map.end()) { : replica_count = iter1->second.size(); : } nit: FindWithDefault http://gerrit.cloudera.org:8080/#/c/18454/29/src/kudu/master/auto_leader_rebalancer.cc@190 PS29, Line 190: uint32_t leader_count = 0; : auto iter2 = uuid_leaders_map.find(uuid); : if (iter2 != uuid_leaders_map.end()) { : leader_count = iter2->second.size(); : } nit: FindWithDefault -- To view, visit http://gerrit.cloudera.org:8080/18454 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibfb60d8759a93b6a19238637c27df4f6b1cac918 Gerrit-Change-Number: 18454 Gerrit-PatchSet: 29 Gerrit-Owner: Yuqi Du <[email protected]> Gerrit-Reviewer: Abhishek Chennaka <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241) Gerrit-Reviewer: Yifan Zhang <[email protected]> Gerrit-Reviewer: Yingchun Lai <[email protected]> Gerrit-Reviewer: Yuqi Du <[email protected]> Gerrit-Comment-Date: Sat, 24 Sep 2022 17:20:57 +0000 Gerrit-HasComments: Yes
