Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/9490 )
Change subject: [tools] Add a tool to recover master data from tablet servers ...................................................................... Patch Set 6: Verified+1 (6 comments) http://gerrit.cloudera.org:8080/#/c/9490/5/src/kudu/tools/master_rebuilder.cc File src/kudu/tools/master_rebuilder.cc: http://gerrit.cloudera.org:8080/#/c/9490/5/src/kudu/tools/master_rebuilder.cc@87 PS5, Line 87: } > Use CHECK_EQ? Done http://gerrit.cloudera.org:8080/#/c/9490/5/src/kudu/tools/master_rebuilder.cc@92 PS5, Line 92: } > CHECK_EQ Done http://gerrit.cloudera.org:8080/#/c/9490/5/src/kudu/tools/master_rebuilder.cc@98 PS5, Line 98: for (const auto& tserver_addr : tserver_addrs_) { > Should use a user specified port. This port is only used if none is provided in 'tserver_addr'. http://gerrit.cloudera.org:8080/#/c/9490/5/src/kudu/tools/master_rebuilder.cc@175 PS5, Line 175: > Use FLAGS_default_num_replicas instead? Good point. I suppose there's also room for a heuristic like: let odd_reported_replicas = the number of replicas reported by tablet servers, + 1 if the number is even let new_rf = max(FLAGS_default_num_replicas, odd_reported_replicas) That way, there's no possibility that the rebuilding of the masters would result in the deletion of any replicas. Even odd_reported_replicas would suffice here. I'll use FLAGS_default_num_replicas for now, but I'm curious what you think of the heuristic. http://gerrit.cloudera.org:8080/#/c/9490/5/src/kudu/tools/master_rebuilder.cc@219 PS5, Line 219: RETURN_NOT_OK(PartitionSchema::FromPB(metadata.partition_schema(), > PartitionSchema has a function Equals too, use it instead? It was removed in this patch https://gerrit.cloudera.org/c/17558/ I'll add a != operator though so this is less surprising syntax. http://gerrit.cloudera.org:8080/#/c/9490/5/src/kudu/tools/master_rebuilder.cc@275 PS5, Line 275: // We do not check the schemas and partition schemas match because they are > Use Equals? Ack -- To view, visit http://gerrit.cloudera.org:8080/9490 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If29e421d466a531ebad72e281ae27e74e458f8c6 Gerrit-Change-Number: 9490 Gerrit-PatchSet: 6 Gerrit-Owner: Will Berkeley <wdberke...@gmail.com> Gerrit-Reviewer: Adar Lieber-Dembo <a...@apache.org> Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com> Gerrit-Reviewer: Attila Bukor <abu...@apache.org> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241) Gerrit-Reviewer: Will Berkeley <wdberke...@gmail.com> Gerrit-Reviewer: Yingchun Lai <acelyc1112...@gmail.com> Gerrit-Comment-Date: Thu, 29 Jul 2021 02:56:23 +0000 Gerrit-HasComments: Yes