Hello Kudu Jenkins, Adar Dembo,

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

    http://gerrit.cloudera.org:8080/14954

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

Change subject: [consensus] short-circuit response path for RequestVote()
......................................................................

[consensus] short-circuit response path for RequestVote()

I saw cases of contention on replica's RaftConsensus lock when the
filesystem was slow on updating Raft metadata files after receiving
Raft update message from a leader replica, while there was a vote
request from another follower replica waiting on the RaftConsensus
object's lock.  The latter request would be simply rejected after just
after acquiring the lock because of the recent updates on the voting
withhold interval.

This patch updates the code by moving the last-heard-from-leader check
into the very beginning of the method, so it's possible to respond NO
to a vote request without acquiring the lock in case if receiving Raft
heartbeats from the leader replica just recently.  It should help a bit
with the overflow of the RaftConsensus RPC queue during election storms.

Change-Id: I67efef72b74ce243ca060e89fcec6eb11e95e8e8
---
M src/kudu/consensus/raft_consensus.cc
M src/kudu/consensus/raft_consensus.h
M src/kudu/util/monotime.cc
M src/kudu/util/monotime.h
4 files changed, 93 insertions(+), 64 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/54/14954/5
--
To view, visit http://gerrit.cloudera.org:8080/14954
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I67efef72b74ce243ca060e89fcec6eb11e95e8e8
Gerrit-Change-Number: 14954
Gerrit-PatchSet: 5
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)

Reply via email to