Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/18496 )
Change subject: [tools] update schema if needed when rebuild master ...................................................................... Patch Set 2: (5 comments) http://gerrit.cloudera.org:8080/#/c/18496/2/src/kudu/tools/kudu-admin-test.cc File src/kudu/tools/kudu-admin-test.cc: http://gerrit.cloudera.org:8080/#/c/18496/2/src/kudu/tools/kudu-admin-test.cc@3040 PS2, Line 3040: const vector<int>& tserver_idxs, What if passing just the number of tablet servers here to be used for the unsafe_rebuild command, not indices? So far all the use cases for this method use indices from 0 to N, so passing just one number would satisfy the requirements. http://gerrit.cloudera.org:8080/#/c/18496/2/src/kudu/tools/kudu-admin-test.cc@3205 PS2, Line 3205: normal newer http://gerrit.cloudera.org:8080/#/c/18496/2/src/kudu/tools/master_rebuilder.cc File src/kudu/tools/master_rebuilder.cc: http://gerrit.cloudera.org:8080/#/c/18496/2/src/kudu/tools/master_rebuilder.cc@228 PS2, Line 228: auto cleanup = MakeScopedCleanup([&]() { : table->mutable_metadata()->CommitMutation(); : }); So, we want to commit the mutation even if returning with an error from this method? Is it intended? http://gerrit.cloudera.org:8080/#/c/18496/2/src/kudu/tools/master_rebuilder.cc@248 PS2, Line 248: Check consistency Check for the consistency. http://gerrit.cloudera.org:8080/#/c/18496/2/src/kudu/tools/master_rebuilder.cc@250 PS2, Line 250: if (!replica.has_schema_version() || : replica.schema_version() == metadata->version()) For better readability, add early return here if the condition isn't true. -- To view, visit http://gerrit.cloudera.org:8080/18496 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iec99d57115228b521ba645b8e19c7057a4bb5d3d Gerrit-Change-Number: 18496 Gerrit-PatchSet: 2 Gerrit-Owner: Yingchun Lai <[email protected]> Gerrit-Reviewer: Abhishek Chennaka <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Comment-Date: Fri, 06 May 2022 19:09:27 +0000 Gerrit-HasComments: Yes
