Andrew Wong has submitted this change and it was merged. ( 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. - The behavior of the PeerMessageQueue when responding to various peer responses. I also removed some election-causing injection in a couple existing tests that was previously required to transfer leadership while quiescing. 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 Reviewed-on: http://gerrit.cloudera.org:8080/15012 Reviewed-by: Adar Dembo <[email protected]> Reviewed-by: Alexey Serbin <[email protected]> Tested-by: Andrew Wong <[email protected]> --- 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(-) Approvals: Adar Dembo: Looks good to me, approved Alexey Serbin: Looks good to me, approved Andrew Wong: Verified -- 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: merged Gerrit-Change-Id: Idbf0716f5c9455f83ff5f6f601b0f5042f77d078 Gerrit-Change-Number: 15012 Gerrit-PatchSet: 8 Gerrit-Owner: Andrew Wong <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241)
