Hello Tidy Bot, Alexey Serbin, Kudu Jenkins, Adar Dembo,

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


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

Change subject: KUDU-3011 p5: transfer leadership when quiescing

KUDU-3011 p5: transfer leadership when quiescing

This amends the behavior of quiescing such that when a tablet server is
quiescing, it will transfer leadership to a caught-up follower as soon
as it can.

While in this state, unlike while in a graceful stepdown period, the
tablet can still be written to, as to not obstruct on-going workloads.

Tests are added to exercise:
- The basic behavior: even without injecting any errors that might cause
  elections, a quiescing leader will relinquish leadership.
- The behavior when there are followers being caught up. In such cases,
  the leader won't immediately relinquish leadership -- instead, it will
  wait for the followers to catch up before stepping down.
- The behavior when being written to. The fact that a leader is
  quiescing shouldn't affect its ability to be written to.
- The behavior of the PeerMessageQueue when responding to various peer

I also removed some election-causing injection in a couple existing
tests that was previously required to transfer leadership while

Note: right now, if all tablet servers are quiescing while there is a
write workload on-going, a large number of StartElection requests will
be sent from the leaders to the followers. A follow-up patch will
address this.

Change-Id: Idbf0716f5c9455f83ff5f6f601b0f5042f77d078
M src/kudu/consensus/consensus_peers-test.cc
M src/kudu/consensus/consensus_queue-test.cc
M src/kudu/consensus/consensus_queue.cc
M src/kudu/consensus/consensus_queue.h
M src/kudu/consensus/raft_consensus.cc
M src/kudu/integration-tests/tablet_server_quiescing-itest.cc
6 files changed, 308 insertions(+), 27 deletions(-)

  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/12/15012/7
To view, visit http://gerrit.cloudera.org:8080/15012
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idbf0716f5c9455f83ff5f6f601b0f5042f77d078
Gerrit-Change-Number: 15012
Gerrit-PatchSet: 7
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)

Reply via email to