Hello Alexey Serbin,
I'd like you to do a code review. Please visit
http://gerrit.cloudera.org:8080/9627
to review the following change.
Change subject: WIP: KUDU-2342. consensus: use tighter bound for non-voter
promotion
......................................................................
WIP: KUDU-2342. consensus: use tighter bound for non-voter promotion
This patch replaces the NON_VOTER promotion heuristic based on the
--consensus_promotion_max_wal_entries_behind gflag with a heuristic that
roughly matches the promotion criteria outlined in Diego Ongaro's
dissertation.
The approach is that we track the operation count of the last batch
successfully sent from leader to peer. If the peer is within that number
of ops of the commit index, the peer is eligible for promotion.
The aforementioned gflag has been removed.
Note: While in consensus_queue.cc I also factored a couple of code
blocks out into methods to reduce the line count of
PeerMessageQueue::ResponseFromPeer().
TODO: Needs tests (passes existing tests).
Change-Id: Iff517f01d6dc25eb15d01593dd57b7dc0dd25956
---
M src/kudu/consensus/consensus_queue.cc
M src/kudu/consensus/consensus_queue.h
2 files changed, 106 insertions(+), 79 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/27/9627/1
--
To view, visit http://gerrit.cloudera.org:8080/9627
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iff517f01d6dc25eb15d01593dd57b7dc0dd25956
Gerrit-Change-Number: 9627
Gerrit-PatchSet: 1
Gerrit-Owner: Mike Percy <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>