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


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.

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

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, 151 insertions(+), 13 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/12/15012/1
--
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: newchange
Gerrit-Change-Id: Idbf0716f5c9455f83ff5f6f601b0f5042f77d078
Gerrit-Change-Number: 15012
Gerrit-PatchSet: 1
Gerrit-Owner: Andrew Wong <[email protected]>

Reply via email to