[kudu-CR] KUDU-3070 allow rewrite raft config take multi tablet id as input

2020-03-08 Thread wangning (Code Review)
wangning 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:

> 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?

That's true, the consistency for tablets is not easy to guarantee.


--
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 
Gerrit-Reviewer: Andrew Wong 
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: wangning <1994wangn...@gmail.com>
Gerrit-Comment-Date: Mon, 09 Mar 2020 02:35:43 +
Gerrit-HasComments: No


[kudu-CR] KUDU-3070 allow rewrite raft config take multi tablet id as input

2020-03-08 Thread Adar Dembo (Code Review)
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 
Gerrit-Reviewer: Andrew Wong 
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Sun, 08 Mar 2020 22:32:05 +
Gerrit-HasComments: No


[kudu-CR] KUDU-3070 allow rewrite raft config take multi tablet id as input

2020-03-06 Thread wangning (Code Review)
Hello Tidy Bot, Kudu Jenkins,

I'd like you to reexamine a change. Please visit

http://gerrit.cloudera.org:8080/15380

to look at the new patch set (#2).

Change subject: KUDU-3070 allow rewrite_raft_config take multi tablet_id as 
input
..

KUDU-3070 allow rewrite_raft_config take multi tablet_id as input

There are some migration cases which need multi tablet_id as input

1. migrate data from standalone node another standalone node
2. migrate data from 3-tservers cluster to another 3-tservers cluster
3. migrate data for those tablet with same raft peers

Change-Id: Ifaec03512086430a6270c458269da1cf996fd9c5
---
M src/kudu/tools/tool_action_local_replica.cc
1 file changed, 35 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/80/15380/2
--
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: newpatchset
Gerrit-Change-Id: Ifaec03512086430a6270c458269da1cf996fd9c5
Gerrit-Change-Number: 15380
Gerrit-PatchSet: 2
Gerrit-Owner: wangning <1994wangn...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)


[kudu-CR] KUDU-3070 allow rewrite raft config take multi tablet id as input

2020-03-06 Thread wangning (Code Review)
wangning has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/15380


Change subject: KUDU-3070 allow rewrite_raft_config take multi tablet_id as 
input
..

KUDU-3070 allow rewrite_raft_config take multi tablet_id as input

There are some migration cases which need multi tablet_id as input

1. migrate data from standalone node another standalone node
2. migrate data from 3-tservers cluster to another 3-tservers cluster
3. migrate data for those tablet with same raft peers

Change-Id: Ifaec03512086430a6270c458269da1cf996fd9c5
---
M src/kudu/tools/tool_action_local_replica.cc
1 file changed, 35 insertions(+), 21 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/80/15380/1
--
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: newchange
Gerrit-Change-Id: Ifaec03512086430a6270c458269da1cf996fd9c5
Gerrit-Change-Number: 15380
Gerrit-PatchSet: 1
Gerrit-Owner: wangning <1994wangn...@gmail.com>