Alexey Serbin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/19357 )

Change subject: [tools] Add 'kudu local_replica tmeta delete_rowsets' to delete 
rowsets from tablet
......................................................................


Patch Set 7:

(4 comments)

Overall looks good to me, just a couple of nits.

http://gerrit.cloudera.org:8080/#/c/19357/7/src/kudu/tools/tool_action_local_replica.cc
File src/kudu/tools/tool_action_local_replica.cc:

http://gerrit.cloudera.org:8080/#/c/19357/7/src/kudu/tools/tool_action_local_replica.cc@158
PS7, Line 158: DECLARE_bool(enable_tablet_orphaned_block_deletion);
nit: is this still needed?


http://gerrit.cloudera.org:8080/#/c/19357/7/src/kudu/tools/tool_action_local_replica.cc@241
PS7, Line 241:
To promote a safer usage of this tool, consider changing the default value for 
the --enable_tablet_orphaned_block_deletion flag to 'false' in the kudu CLI 
binary by adding the following:

  CHECK_NE("", SetCommandLineOptionWithMode(
      "enable_tablet_orphaned_block_deletion",
      "false",
      SET_FLAGS_DEFAULT));


http://gerrit.cloudera.org:8080/#/c/19357/7/src/kudu/tools/tool_action_local_replica.cc@1266
PS7, Line 1266: (
How about the following text for ExtraDescription() with minor improvements on 
the original:


The common usage pattern of this tool is described below. That involves 
checking the result by a dry run of the tablet server with the modified 
tablet's data after running the tool. It's crucial to customize tablet server's 
--enable_tablet_orphaned_block_deletion flag for the dry run to avoid deleting 
orphaned blocks, so it's possible to roll back to the original state of the 
tablet's data if something goes wrong. First, run the tool with default 
settings for  --backup_metadata and --enable_tablet_orphaned_block_deletion to 
(a) create a backup of the original metadata file and (b) keep the orphaned 
blocks on the file system. Second, start the tablet server with 
--enable_tablet_orphaned_block_deletion=false to check whether the change 
worked as expected and the tablet server works fine with the new state of the 
tablet's data. If it doesn't work as expected, stop the tablet server (if still 
running), rollback the change by replacing the updated metadata file with the 
backup created earlier, and retry the  procedure again, specifying proper 
rowset identifiers to the tool. If the change works as expected and the tablet 
server runs fine after with the updated tablet's data, remove the customization 
for the --enable_tablet_orphaned_block_deletion flag and restart the tablet 
server.


http://gerrit.cloudera.org:8080/#/c/19357/7/src/kudu/tools/tool_action_local_replica.cc@1269
PS7, Line 1269: "
nit: add a space before the double quote



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If2cf9035babf4c3af4c238cebe8dcecd2c65848f
Gerrit-Change-Number: 19357
Gerrit-PatchSet: 7
Gerrit-Owner: Yingchun Lai <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: KeDeng <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Wang Xixu <[email protected]>
Gerrit-Reviewer: Yifan Zhang <[email protected]>
Gerrit-Reviewer: Yingchun Lai <[email protected]>
Gerrit-Reviewer: Yuqi Du <[email protected]>
Gerrit-Comment-Date: Wed, 04 Jan 2023 20:44:17 +0000
Gerrit-HasComments: Yes

Reply via email to