Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/15380 )
Change subject: KUDU-3070 allow rewrite_raft_config take multi tablet_id as input ...................................................................... Patch Set 2: While reviewing this, I naturally wondered why we should allow the list to receive a list of tablet IDs rather than force users to provide the list using a shell script loop. Then I looked at what you had written in KUDU-3070 and saw that you had began with that, but the repeated cost of opening an FsManager was causing the overall operation to be very expensive. How about this as an alternative: let's make it possible to open an FsManager _without opening a BlockManager_. There are many CLI tools that don't manipulate data blocks and could use this alternate open mode to speed up their operations. But by opening the FsManager and DataDirManager, we continue to enforce that read-write operations must lock the directories first, preventing consistency issues if run alongside a running tserver/master. To make this work, we'd need to skip the following lines of code in fs_manager.cc: // Finally, initialize and open the block manager. InitBlockManager(); LOG_TIMING(INFO, "opening block manager") { RETURN_NOT_OK(block_manager_->Open(report)); } We'd also need to make sure that the returned FsReport makes sense, and also that the various FsManager methods that invoke or return the BlockManager DCHECK that it exists first. Then we can start rolling out this alternate open mode for whichever CLI tools could safely use it. What do you think? -- To view, visit http://gerrit.cloudera.org:8080/15380 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ifaec03512086430a6270c458269da1cf996fd9c5 Gerrit-Change-Number: 15380 Gerrit-PatchSet: 2 Gerrit-Owner: wangning <1994wangn...@gmail.com> Gerrit-Reviewer: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241) Gerrit-Comment-Date: Sun, 08 Mar 2020 22:32:05 +0000 Gerrit-HasComments: No