Hello Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/7331
to look at the new patch set (#2).
Change subject: consensus_peers: schedule raft heartbeats through messenger
......................................................................
consensus_peers: schedule raft heartbeats through messenger
This patch switches Peer to a Messenger-based approach (i.e.
Messenger::ScheduleOnReactor) for scheduling heartbeats. The problem with
ResettableHeartbeater was that it creates a dedicated thread per replica,
and I couldn't see an easy way to share it across replicas.
The scheduling is inspired by libev's "Let the timer time out, but then
re-arm it as required" approach[1]. Callbacks are never canceled since the
Messenger doesn't support that. Instead, the next heartbeat time is
maintained as out-of-band state, and we ensure that the callback period is
low enough that it can honor any heartbeat time.
1.
http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#code_ev_timer_code_relative_and_opti
Change-Id: Iac8e09fe02dd32885ef0cf644cb093b1c8e6afb8
---
M src/kudu/consensus/consensus-test-util.h
M src/kudu/consensus/consensus_peers-test.cc
M src/kudu/consensus/consensus_peers.cc
M src/kudu/consensus/consensus_peers.h
M src/kudu/consensus/leader_election-test.cc
M src/kudu/consensus/peer_manager.cc
M src/kudu/consensus/raft_consensus_quorum-test.cc
M src/kudu/tserver/tablet_copy_source_session-test.cc
8 files changed, 191 insertions(+), 52 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/31/7331/2
--
To view, visit http://gerrit.cloudera.org:8080/7331
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iac8e09fe02dd32885ef0cf644cb093b1c8e6afb8
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: David Ribeiro Alves <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <[email protected]>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <[email protected]>