You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Andrew Wong (Code Review)" <ge...@cloudera.org> on 2020/01/04 04:39:00 UTC

[kudu-CR] KUDU-3011 p2: mechanism to quiesce leadership

Andrew Wong has uploaded this change for review. ( http://gerrit.cloudera.org:8080/14977


Change subject: KUDU-3011 p2: mechanism to quiesce leadership
......................................................................

KUDU-3011 p2: mechanism to quiesce leadership

This plumbs a functor from the TabletServer down to the RaftConsensus
instance of each TabletReplica that indicates whether the server is in a
quiescing state.

When in this state, any election started by a RaftConsensus instance on
the server will fail with an error.

Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
---
M src/kudu/consensus/raft_consensus.cc
M src/kudu/consensus/raft_consensus.h
M src/kudu/consensus/raft_consensus_quorum-test.cc
M src/kudu/integration-tests/CMakeLists.txt
A src/kudu/integration-tests/tablet_server_quiescing-itest.cc
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet_replica-test.cc
M src/kudu/tserver/tablet_copy_source_session-test.cc
M src/kudu/tserver/tablet_server.cc
M src/kudu/tserver/tablet_server.h
M src/kudu/tserver/ts_tablet_manager.cc
M src/kudu/tserver/ts_tablet_manager.h
12 files changed, 206 insertions(+), 11 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/77/14977/1
-- 
To view, visit http://gerrit.cloudera.org:8080/14977
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
Gerrit-Change-Number: 14977
Gerrit-PatchSet: 1
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>

[kudu-CR] KUDU-3011 p2: mechanism to quiesce leadership

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/14977 )

Change subject: KUDU-3011 p2: mechanism to quiesce leadership
......................................................................


Patch Set 4: Code-Review+2

(1 comment)

http://gerrit.cloudera.org:8080/#/c/14977/4/src/kudu/consensus/raft_consensus.cc
File src/kudu/consensus/raft_consensus.cc:

http://gerrit.cloudera.org:8080/#/c/14977/4/src/kudu/consensus/raft_consensus.cc@382
PS4, Line 382:     WARN_NOT_OK(StartElection(NORMAL_ELECTION, INITIAL_SINGLE_NODE_ELECTION),
             :                 "Couldn't start leader election");
So for singleton replicas, when should we expect this to fail? What's the outcome? A forever follower replica?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
Gerrit-Change-Number: 14977
Gerrit-PatchSet: 4
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Mon, 06 Jan 2020 21:10:17 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-3011 p2: mechanism to quiesce leadership

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/14977 )

Change subject: KUDU-3011 p2: mechanism to quiesce leadership
......................................................................


Patch Set 10: Code-Review+2

(2 comments)

http://gerrit.cloudera.org:8080/#/c/14977/7//COMMIT_MSG
Commit Message:

PS7: 
> Yeah, I would rather address that in a later patch, if you don't mind -- I 
SGTM.


http://gerrit.cloudera.org:8080/#/c/14977/7//COMMIT_MSG@13
PS7, Line 13: election started
> It's a good question, and I actually originally started going down that rou
SGTM.  Probably, the better optimization is to avoid tablet copying at the master side when target tablet server is quiescent.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
Gerrit-Change-Number: 14977
Gerrit-PatchSet: 10
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Tue, 07 Jan 2020 07:09:17 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-3011 p2: mechanism to quiesce leadership

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/14977 )

Change subject: KUDU-3011 p2: mechanism to quiesce leadership
......................................................................


Patch Set 3:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/14977/2/src/kudu/consensus/raft_consensus.cc
File src/kudu/consensus/raft_consensus.cc:

http://gerrit.cloudera.org:8080/#/c/14977/2/src/kudu/consensus/raft_consensus.cc@444
PS2, Line 444:   if (server_ctx_.quiescing && server_ctx_.quiescing->load()) {
> Will it be possible to quiesce a tserver as it is bootstrapping replicas? I
You're right for the singe replica case, but it seems like failure to start an election is usually inconsequential via warning logs. I'll follow suit in the single replica case.


http://gerrit.cloudera.org:8080/#/c/14977/2/src/kudu/tserver/tablet_server.h
File src/kudu/tserver/tablet_server.h:

http://gerrit.cloudera.org:8080/#/c/14977/2/src/kudu/tserver/tablet_server.h@107
PS2, Line 107:   // The options passed at construction time.
             :   const TabletServerOptions opts_;
             : 
> Make it an std::atomic and forgo the lock?
Done



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
Gerrit-Change-Number: 14977
Gerrit-PatchSet: 3
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Mon, 06 Jan 2020 07:50:41 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-3011 p2: mechanism to quiesce leadership

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/14977 )

Change subject: KUDU-3011 p2: mechanism to quiesce leadership
......................................................................


Patch Set 7:

(3 comments)

The TSAN failure of TestNumLeadersMetric wasn't related to this patch; I'll get to the bottom of it.

http://gerrit.cloudera.org:8080/#/c/14977/7//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/14977/7//COMMIT_MSG@13
PS7, Line 13: election started
> What about tablet copying?  Should the system behave differently in case if
It's a good question, and I actually originally started going down that route. It'd probably be a good optimization, but I don't think it is a requirement. Tablet copies are "crash safe" in that shutting down while one is happening will be fine -- the copy will just need to be restarted.


http://gerrit.cloudera.org:8080/#/c/14977/4/src/kudu/consensus/raft_consensus.cc
File src/kudu/consensus/raft_consensus.cc:

http://gerrit.cloudera.org:8080/#/c/14977/4/src/kudu/consensus/raft_consensus.cc@382
PS4, Line 382:     WARN_NOT_OK(StartElection(NORMAL_ELECTION, INITIAL_SINGLE_NODE_ELECTION),
             :                 "Couldn't start leader election");
> Whoops, it seems I started some comment and left it incomplete.  I was abou
>Thinking ahead to KUDU-2975, are there any WAL write subcalls that we should be concerned with?
Yes, but not here.

>Whoops, it seems I started some comment and left it incomplete.  I was about to ask whether the single-replica scenario case should be covered by a test, i.e. making sure that a single replica tablet starts an election and elects its single replica a leader once quiescent period is over.
Yep, TServerQuiescingParamITest.TestNoElectionsForNewReplicas is parameterized by the number of replicas (1 and 3).


http://gerrit.cloudera.org:8080/#/c/14977/7/src/kudu/integration-tests/tablet_server_quiescing-itest.cc
File src/kudu/integration-tests/tablet_server_quiescing-itest.cc:

http://gerrit.cloudera.org:8080/#/c/14977/7/src/kudu/integration-tests/tablet_server_quiescing-itest.cc@64
PS7, Line 64: hitting
> drop ?
Done



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
Gerrit-Change-Number: 14977
Gerrit-PatchSet: 7
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Tue, 07 Jan 2020 00:03:07 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-3011 p2: mechanism to quiesce leadership

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/14977 )

Change subject: KUDU-3011 p2: mechanism to quiesce leadership
......................................................................


Patch Set 7: Code-Review+2


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
Gerrit-Change-Number: 14977
Gerrit-PatchSet: 7
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Mon, 06 Jan 2020 22:13:44 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-3011 p2: mechanism to quiesce leadership

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/14977 )

Change subject: KUDU-3011 p2: mechanism to quiesce leadership
......................................................................


Patch Set 7:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/14977/4/src/kudu/consensus/raft_consensus.cc
File src/kudu/consensus/raft_consensus.cc:

http://gerrit.cloudera.org:8080/#/c/14977/4/src/kudu/consensus/raft_consensus.cc@382
PS4, Line 382:     WARN_NOT_OK(StartElection(NORMAL_ELECTION, INITIAL_SINGLE_NODE_ELECTION),
             :                 "Couldn't start leader election");
> Failing to write cmeta or failing to write a WAL entry would lead to a cras
Thinking ahead to KUDU-2975, are there any WAL write subcalls that we should be concerned with?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
Gerrit-Change-Number: 14977
Gerrit-PatchSet: 7
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Mon, 06 Jan 2020 22:13:07 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-3011 p2: mechanism to quiesce leadership

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/14977 )

Change subject: KUDU-3011 p2: mechanism to quiesce leadership
......................................................................


Patch Set 6: Code-Review+2

(1 comment)

http://gerrit.cloudera.org:8080/#/c/14977/4/src/kudu/consensus/raft_consensus.cc
File src/kudu/consensus/raft_consensus.cc:

http://gerrit.cloudera.org:8080/#/c/14977/4/src/kudu/consensus/raft_consensus.cc@382
PS4, Line 382:     WARN_NOT_OK(StartElection(NORMAL_ELECTION, INITIAL_SINGLE_NODE_ELECTION),
             :                 "Couldn't start leader election");
> If the replica is being shut down, StartElection() can fail. There also see
I was worried about IO-related failures e.g. updating cmeta or writing a WAL entry. Would they all lead to a failed replica?

Basically just want to make sure we never wind up in a state where the replica is a follower, isn't failed, and nothing happens after that.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
Gerrit-Change-Number: 14977
Gerrit-PatchSet: 6
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Mon, 06 Jan 2020 21:50:24 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-3011 p2: mechanism to quiesce leadership

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/14977 )

Change subject: KUDU-3011 p2: mechanism to quiesce leadership
......................................................................


Patch Set 7:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/14977/7//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/14977/7//COMMIT_MSG@13
PS7, Line 13: election started
What about tablet copying?  Should the system behave differently in case if a tablet servers is in the quiescent state?


http://gerrit.cloudera.org:8080/#/c/14977/4/src/kudu/consensus/raft_consensus.cc
File src/kudu/consensus/raft_consensus.cc:

http://gerrit.cloudera.org:8080/#/c/14977/4/src/kudu/consensus/raft_consensus.cc@382
PS4, Line 382:     WARN_NOT_OK(StartElection(NORMAL_ELECTION, INITIAL_SINGLE_NODE_ELECTION),
             :                 "Couldn't start leader election");
> Thinking ahead to KUDU-2975, are there any WAL write subcalls that we shoul
Should



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
Gerrit-Change-Number: 14977
Gerrit-PatchSet: 7
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Mon, 06 Jan 2020 23:07:01 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-3011 p2: mechanism to quiesce leadership

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Kudu Jenkins, Adar Dembo, 

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

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

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

Change subject: KUDU-3011 p2: mechanism to quiesce leadership
......................................................................

KUDU-3011 p2: mechanism to quiesce leadership

This plumbs a functor from the TabletServer down to the RaftConsensus
instance of each TabletReplica that indicates whether the server is in a
quiescing state.

When in this state, any election started by a RaftConsensus instance on
the server will fail with an error.

Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
---
M src/kudu/consensus/raft_consensus.cc
M src/kudu/consensus/raft_consensus.h
M src/kudu/consensus/raft_consensus_quorum-test.cc
M src/kudu/integration-tests/CMakeLists.txt
A src/kudu/integration-tests/tablet_server_quiescing-itest.cc
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet_replica-test.cc
M src/kudu/tserver/tablet_copy_source_session-test.cc
M src/kudu/tserver/tablet_server.cc
M src/kudu/tserver/tablet_server.h
M src/kudu/tserver/ts_tablet_manager.cc
11 files changed, 247 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/77/14977/5
-- 
To view, visit http://gerrit.cloudera.org:8080/14977
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
Gerrit-Change-Number: 14977
Gerrit-PatchSet: 5
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)

[kudu-CR] KUDU-3011 p2: mechanism to quiesce leadership

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has removed a vote on this change.

Change subject: KUDU-3011 p2: mechanism to quiesce leadership
......................................................................


Removed Verified-1 by Kudu Jenkins (120)
-- 
To view, visit http://gerrit.cloudera.org:8080/14977
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: deleteVote
Gerrit-Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
Gerrit-Change-Number: 14977
Gerrit-PatchSet: 10
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)

[kudu-CR] KUDU-3011 p2: mechanism to quiesce leadership

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/14977 )

Change subject: KUDU-3011 p2: mechanism to quiesce leadership
......................................................................


Patch Set 10: Verified+1

(1 comment)

Test failures were unrelated.

http://gerrit.cloudera.org:8080/#/c/14977/7//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/14977/7//COMMIT_MSG@13
PS7, Line 13: election started
> SGTM.  Probably, the better optimization is to avoid tablet copying at the 
Right, I intend on leveraging maintenance mode for that.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
Gerrit-Change-Number: 14977
Gerrit-PatchSet: 10
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Tue, 07 Jan 2020 07:37:41 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-3011 p2: mechanism to quiesce leadership

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/14977 )

Change subject: KUDU-3011 p2: mechanism to quiesce leadership
......................................................................


Patch Set 6:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/14977/4/src/kudu/consensus/raft_consensus.cc
File src/kudu/consensus/raft_consensus.cc:

http://gerrit.cloudera.org:8080/#/c/14977/4/src/kudu/consensus/raft_consensus.cc@382
PS4, Line 382:     WARN_NOT_OK(StartElection(NORMAL_ELECTION, INITIAL_SINGLE_NODE_ELECTION),
             :                 "Couldn't start leader election");
> I was worried about IO-related failures e.g. updating cmeta or writing a WA
Failing to write cmeta or failing to write a WAL entry would lead to a crash, since failures of WALs and metadata aren't tolerated right now. One such pathway is in StartElection() we call SetVotedForCurrentTermUnlocked(), which does IO to write the cmeta -- that's wrapped in a CHECK (as are many WAL and metadata operations, probably from a time before it was considered better practice to LOG(FATAL) instead).



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
Gerrit-Change-Number: 14977
Gerrit-PatchSet: 6
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Mon, 06 Jan 2020 21:59:35 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-3011 p2: mechanism to quiesce leadership

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/14977 )

Change subject: KUDU-3011 p2: mechanism to quiesce leadership
......................................................................


Patch Set 8:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/14977/8/src/kudu/integration-tests/tablet_server_quiescing-itest.cc
File src/kudu/integration-tests/tablet_server_quiescing-itest.cc:

http://gerrit.cloudera.org:8080/#/c/14977/8/src/kudu/integration-tests/tablet_server_quiescing-itest.cc@72
PS8, Line 72: const string kTableName = "foo";
Is it needed?


http://gerrit.cloudera.org:8080/#/c/14977/8/src/kudu/integration-tests/tablet_server_quiescing-itest.cc@129
PS8, Line 129: const string kTableName = "foo";
ditto


http://gerrit.cloudera.org:8080/#/c/14977/8/src/kudu/integration-tests/tablet_server_quiescing-itest.cc@178
PS8, Line 178: const string kTableName = "foo";
ditto



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
Gerrit-Change-Number: 14977
Gerrit-PatchSet: 8
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Tue, 07 Jan 2020 00:31:36 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-3011 p2: mechanism to quiesce leadership

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/14977 )

Change subject: KUDU-3011 p2: mechanism to quiesce leadership
......................................................................


Patch Set 4:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/14977/4/src/kudu/consensus/raft_consensus.cc
File src/kudu/consensus/raft_consensus.cc:

http://gerrit.cloudera.org:8080/#/c/14977/4/src/kudu/consensus/raft_consensus.cc@382
PS4, Line 382:     WARN_NOT_OK(StartElection(NORMAL_ELECTION, INITIAL_SINGLE_NODE_ELECTION),
             :                 "Couldn't start leader election");
> So for singleton replicas, when should we expect this to fail? What's the o
If the replica is being shut down, StartElection() can fail. There also seem to be some invariant-related error statuses that can surface here. The main "expected" error is that for quiescing, which is tested in TServerQuiescingParamITest.TestNoElectionsForNewReplicas: it'll be a follower until we stop quiescing the server and we can start an election. I.e. when we stop quiescing the server, the failure detector will pop and we'll see elections happen.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
Gerrit-Change-Number: 14977
Gerrit-PatchSet: 4
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Mon, 06 Jan 2020 21:26:46 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-3011 p2: mechanism to quiesce leadership

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/14977 )

Change subject: KUDU-3011 p2: mechanism to quiesce leadership
......................................................................


Patch Set 8:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/14977/7//COMMIT_MSG
Commit Message:

PS7: 
With this approach when StartElection() returns an error, would it be a flood of warning messages in the tablet server's logs when the tablet server enters a quiescent period?


http://gerrit.cloudera.org:8080/#/c/14977/7/src/kudu/integration-tests/tablet_server_quiescing-itest.cc
File src/kudu/integration-tests/tablet_server_quiescing-itest.cc:

PS7: 
Does it make sense to add a test to verify that even with a majority of replicas in quiescent state, a tablet still can elect a leader if the election is started by a replica that is  in normal state?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
Gerrit-Change-Number: 14977
Gerrit-PatchSet: 8
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Tue, 07 Jan 2020 00:04:40 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-3011 p2: mechanism to quiesce leadership

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Alexey Serbin, Kudu Jenkins, Adar Dembo, 

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

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

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

Change subject: KUDU-3011 p2: mechanism to quiesce leadership
......................................................................

KUDU-3011 p2: mechanism to quiesce leadership

This plumbs a shared flag from the TabletServer down to the
RaftConsensus instance of each TabletReplica that indicates whether the
server is in a quiescing state.

When in this state, any election started by a RaftConsensus instance on
the server will fail with an error.

Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
---
M src/kudu/consensus/raft_consensus.cc
M src/kudu/consensus/raft_consensus.h
M src/kudu/consensus/raft_consensus_quorum-test.cc
M src/kudu/integration-tests/CMakeLists.txt
A src/kudu/integration-tests/tablet_server_quiescing-itest.cc
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet_replica-test.cc
M src/kudu/tserver/tablet_copy_source_session-test.cc
M src/kudu/tserver/tablet_server.cc
M src/kudu/tserver/tablet_server.h
M src/kudu/tserver/ts_tablet_manager.cc
11 files changed, 263 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/77/14977/9
-- 
To view, visit http://gerrit.cloudera.org:8080/14977
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
Gerrit-Change-Number: 14977
Gerrit-PatchSet: 9
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)

[kudu-CR] KUDU-3011 p2: mechanism to quiesce leadership

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/14977 )

Change subject: KUDU-3011 p2: mechanism to quiesce leadership
......................................................................


Patch Set 9:

(5 comments)

http://gerrit.cloudera.org:8080/#/c/14977/7//COMMIT_MSG
Commit Message:

PS7: 
> With this approach when StartElection() returns an error, would it be a flo
Yeah, I would rather address that in a later patch, if you don't mind -- I think throttling would be non-negligible code and would distract from this patch.


http://gerrit.cloudera.org:8080/#/c/14977/7/src/kudu/integration-tests/tablet_server_quiescing-itest.cc
File src/kudu/integration-tests/tablet_server_quiescing-itest.cc:

PS7: 
> Does it make sense to add a test to verify that even with a majority of rep
Done


http://gerrit.cloudera.org:8080/#/c/14977/8/src/kudu/integration-tests/tablet_server_quiescing-itest.cc
File src/kudu/integration-tests/tablet_server_quiescing-itest.cc:

http://gerrit.cloudera.org:8080/#/c/14977/8/src/kudu/integration-tests/tablet_server_quiescing-itest.cc@72
PS8, Line 72:     if (tablet_ids) {
> Is it needed?
Done


http://gerrit.cloudera.org:8080/#/c/14977/8/src/kudu/integration-tests/tablet_server_quiescing-itest.cc@129
PS8, Line 129: vector<string> tablet_ids;
> ditto
Done


http://gerrit.cloudera.org:8080/#/c/14977/8/src/kudu/integration-tests/tablet_server_quiescing-itest.cc@178
PS8, Line 178: *ts->server()->mutable_quiescing
> ditto
Done



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
Gerrit-Change-Number: 14977
Gerrit-PatchSet: 9
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Tue, 07 Jan 2020 04:09:04 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-3011 p2: mechanism to quiesce leadership

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Kudu Jenkins, 

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

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

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

Change subject: KUDU-3011 p2: mechanism to quiesce leadership
......................................................................

KUDU-3011 p2: mechanism to quiesce leadership

This plumbs a functor from the TabletServer down to the RaftConsensus
instance of each TabletReplica that indicates whether the server is in a
quiescing state.

When in this state, any election started by a RaftConsensus instance on
the server will fail with an error.

Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
---
M src/kudu/consensus/raft_consensus.cc
M src/kudu/consensus/raft_consensus.h
M src/kudu/consensus/raft_consensus_quorum-test.cc
M src/kudu/integration-tests/CMakeLists.txt
A src/kudu/integration-tests/tablet_server_quiescing-itest.cc
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet_replica-test.cc
M src/kudu/tserver/tablet_copy_source_session-test.cc
M src/kudu/tserver/tablet_server.cc
M src/kudu/tserver/tablet_server.h
M src/kudu/tserver/ts_tablet_manager.cc
M src/kudu/tserver/ts_tablet_manager.h
12 files changed, 205 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/77/14977/2
-- 
To view, visit http://gerrit.cloudera.org:8080/14977
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
Gerrit-Change-Number: 14977
Gerrit-PatchSet: 2
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)

[kudu-CR] KUDU-3011 p2: mechanism to quiesce leadership

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Alexey Serbin, Kudu Jenkins, Adar Dembo, 

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

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

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

Change subject: KUDU-3011 p2: mechanism to quiesce leadership
......................................................................

KUDU-3011 p2: mechanism to quiesce leadership

This plumbs a shared flag from the TabletServer down to the
RaftConsensus instance of each TabletReplica that indicates whether the
server is in a quiescing state.

When in this state, any election started by a RaftConsensus instance on
the server will fail with an error.

Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
---
M src/kudu/consensus/raft_consensus.cc
M src/kudu/consensus/raft_consensus.h
M src/kudu/consensus/raft_consensus_quorum-test.cc
M src/kudu/integration-tests/CMakeLists.txt
A src/kudu/integration-tests/tablet_server_quiescing-itest.cc
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet_replica-test.cc
M src/kudu/tserver/tablet_copy_source_session-test.cc
M src/kudu/tserver/tablet_server.cc
M src/kudu/tserver/tablet_server.h
M src/kudu/tserver/ts_tablet_manager.cc
11 files changed, 247 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/77/14977/8
-- 
To view, visit http://gerrit.cloudera.org:8080/14977
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
Gerrit-Change-Number: 14977
Gerrit-PatchSet: 8
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)

[kudu-CR] KUDU-3011 p2: mechanism to quiesce leadership

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/14977 )

Change subject: KUDU-3011 p2: mechanism to quiesce leadership
......................................................................


Patch Set 4:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/14977/4/src/kudu/consensus/raft_consensus.cc
File src/kudu/consensus/raft_consensus.cc:

http://gerrit.cloudera.org:8080/#/c/14977/4/src/kudu/consensus/raft_consensus.cc@382
PS4, Line 382:     WARN_NOT_OK(StartElection(NORMAL_ELECTION, INITIAL_SINGLE_NODE_ELECTION),
             :                 "Couldn't start leader election");
> Should
Whoops, it seems I started some comment and left it incomplete.  I was about to ask whether the single-replica scenario case should be covered by a test, i.e. making sure that a single replica tablet starts an election and elects its single replica a leader once quiescent period is over.


http://gerrit.cloudera.org:8080/#/c/14977/7/src/kudu/integration-tests/tablet_server_quiescing-itest.cc
File src/kudu/integration-tests/tablet_server_quiescing-itest.cc:

http://gerrit.cloudera.org:8080/#/c/14977/7/src/kudu/integration-tests/tablet_server_quiescing-itest.cc@64
PS7, Line 64: hitting
drop ?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
Gerrit-Change-Number: 14977
Gerrit-PatchSet: 4
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Mon, 06 Jan 2020 23:28:42 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-3011 p2: mechanism to quiesce leadership

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Kudu Jenkins, Adar Dembo, 

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

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

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

Change subject: KUDU-3011 p2: mechanism to quiesce leadership
......................................................................

KUDU-3011 p2: mechanism to quiesce leadership

This plumbs a shared flag from the TabletServer down to the
RaftConsensus instance of each TabletReplica that indicates whether the
server is in a quiescing state.

When in this state, any election started by a RaftConsensus instance on
the server will fail with an error.

Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
---
M src/kudu/consensus/raft_consensus.cc
M src/kudu/consensus/raft_consensus.h
M src/kudu/consensus/raft_consensus_quorum-test.cc
M src/kudu/integration-tests/CMakeLists.txt
A src/kudu/integration-tests/tablet_server_quiescing-itest.cc
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet_replica-test.cc
M src/kudu/tserver/tablet_copy_source_session-test.cc
M src/kudu/tserver/tablet_server.cc
M src/kudu/tserver/tablet_server.h
M src/kudu/tserver/ts_tablet_manager.cc
11 files changed, 247 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/77/14977/6
-- 
To view, visit http://gerrit.cloudera.org:8080/14977
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
Gerrit-Change-Number: 14977
Gerrit-PatchSet: 6
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)

[kudu-CR] KUDU-3011 p2: mechanism to quiesce leadership

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/14977 )

Change subject: KUDU-3011 p2: mechanism to quiesce leadership
......................................................................


Patch Set 2:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/14977/2/src/kudu/consensus/raft_consensus.cc
File src/kudu/consensus/raft_consensus.cc:

http://gerrit.cloudera.org:8080/#/c/14977/2/src/kudu/consensus/raft_consensus.cc@444
PS2, Line 444:     return Status::IllegalState("leader elections are disabled");
Will it be possible to quiesce a tserver as it is bootstrapping replicas? If so, it looks like this failure will percolate up into outright replica failure, which seems undesirable.

Though I guess this also applies to new replica creation: a failure here will cause the newly created replica to be marked as failed (see RaftConsensus::Start).


http://gerrit.cloudera.org:8080/#/c/14977/2/src/kudu/tserver/tablet_server.h
File src/kudu/tserver/tablet_server.h:

http://gerrit.cloudera.org:8080/#/c/14977/2/src/kudu/tserver/tablet_server.h@107
PS2, Line 107:   mutable simple_spinlock quiescing_lock_;
             :   bool quiescing_;
             : 
Make it an std::atomic and forgo the lock?

Then you could also plumb the member directly into the replicas rather than indirecting thru a functor, right?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
Gerrit-Change-Number: 14977
Gerrit-PatchSet: 2
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Mon, 06 Jan 2020 05:36:16 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-3011 p2: mechanism to quiesce leadership

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/14977 )

Change subject: KUDU-3011 p2: mechanism to quiesce leadership
......................................................................

KUDU-3011 p2: mechanism to quiesce leadership

This plumbs a shared flag from the TabletServer down to the
RaftConsensus instance of each TabletReplica that indicates whether the
server is in a quiescing state.

When in this state, any election started by a RaftConsensus instance on
the server will fail with an error.

Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
Reviewed-on: http://gerrit.cloudera.org:8080/14977
Reviewed-by: Alexey Serbin <as...@cloudera.com>
Tested-by: Andrew Wong <aw...@cloudera.com>
---
M src/kudu/consensus/raft_consensus.cc
M src/kudu/consensus/raft_consensus.h
M src/kudu/consensus/raft_consensus_quorum-test.cc
M src/kudu/integration-tests/CMakeLists.txt
A src/kudu/integration-tests/tablet_server_quiescing-itest.cc
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet_replica-test.cc
M src/kudu/tserver/tablet_copy_source_session-test.cc
M src/kudu/tserver/tablet_server.cc
M src/kudu/tserver/tablet_server.h
M src/kudu/tserver/ts_tablet_manager.cc
11 files changed, 264 insertions(+), 12 deletions(-)

Approvals:
  Alexey Serbin: Looks good to me, approved
  Andrew Wong: Verified

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
Gerrit-Change-Number: 14977
Gerrit-PatchSet: 11
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)

[kudu-CR] KUDU-3011 p2: mechanism to quiesce leadership

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Kudu Jenkins, Adar Dembo, 

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

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

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

Change subject: KUDU-3011 p2: mechanism to quiesce leadership
......................................................................

KUDU-3011 p2: mechanism to quiesce leadership

This plumbs a functor from the TabletServer down to the RaftConsensus
instance of each TabletReplica that indicates whether the server is in a
quiescing state.

When in this state, any election started by a RaftConsensus instance on
the server will fail with an error.

Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
---
M src/kudu/consensus/raft_consensus.cc
M src/kudu/consensus/raft_consensus.h
M src/kudu/consensus/raft_consensus_quorum-test.cc
M src/kudu/integration-tests/CMakeLists.txt
A src/kudu/integration-tests/tablet_server_quiescing-itest.cc
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet_replica-test.cc
M src/kudu/tserver/tablet_copy_source_session-test.cc
M src/kudu/tserver/tablet_server.cc
M src/kudu/tserver/tablet_server.h
M src/kudu/tserver/ts_tablet_manager.cc
11 files changed, 247 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/77/14977/4
-- 
To view, visit http://gerrit.cloudera.org:8080/14977
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
Gerrit-Change-Number: 14977
Gerrit-PatchSet: 4
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)

[kudu-CR] KUDU-3011 p2: mechanism to quiesce leadership

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Alexey Serbin, Kudu Jenkins, Adar Dembo, 

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

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

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

Change subject: KUDU-3011 p2: mechanism to quiesce leadership
......................................................................

KUDU-3011 p2: mechanism to quiesce leadership

This plumbs a shared flag from the TabletServer down to the
RaftConsensus instance of each TabletReplica that indicates whether the
server is in a quiescing state.

When in this state, any election started by a RaftConsensus instance on
the server will fail with an error.

Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
---
M src/kudu/consensus/raft_consensus.cc
M src/kudu/consensus/raft_consensus.h
M src/kudu/consensus/raft_consensus_quorum-test.cc
M src/kudu/integration-tests/CMakeLists.txt
A src/kudu/integration-tests/tablet_server_quiescing-itest.cc
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet_replica-test.cc
M src/kudu/tserver/tablet_copy_source_session-test.cc
M src/kudu/tserver/tablet_server.cc
M src/kudu/tserver/tablet_server.h
M src/kudu/tserver/ts_tablet_manager.cc
11 files changed, 264 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/77/14977/10
-- 
To view, visit http://gerrit.cloudera.org:8080/14977
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
Gerrit-Change-Number: 14977
Gerrit-PatchSet: 10
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)

[kudu-CR] KUDU-3011 p2: mechanism to quiesce leadership

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Kudu Jenkins, Adar Dembo, 

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

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

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

Change subject: KUDU-3011 p2: mechanism to quiesce leadership
......................................................................

KUDU-3011 p2: mechanism to quiesce leadership

This plumbs a functor from the TabletServer down to the RaftConsensus
instance of each TabletReplica that indicates whether the server is in a
quiescing state.

When in this state, any election started by a RaftConsensus instance on
the server will fail with an error.

Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
---
M src/kudu/consensus/raft_consensus.cc
M src/kudu/consensus/raft_consensus.h
M src/kudu/consensus/raft_consensus_quorum-test.cc
M src/kudu/integration-tests/CMakeLists.txt
A src/kudu/integration-tests/tablet_server_quiescing-itest.cc
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet_replica-test.cc
M src/kudu/tserver/tablet_copy_source_session-test.cc
M src/kudu/tserver/tablet_server.cc
M src/kudu/tserver/tablet_server.h
M src/kudu/tserver/ts_tablet_manager.cc
11 files changed, 251 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/77/14977/3
-- 
To view, visit http://gerrit.cloudera.org:8080/14977
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0eb3778fe094647bc5f61f97971087d7efb8af5e
Gerrit-Change-Number: 14977
Gerrit-PatchSet: 3
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)