Alexey Serbin has uploaded this change for review. ( http://gerrit.cloudera.org:8080/14954
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 2 files changed, 68 insertions(+), 61 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/54/14954/1 -- 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: newchange Gerrit-Change-Id: I67efef72b74ce243ca060e89fcec6eb11e95e8e8 Gerrit-Change-Number: 14954 Gerrit-PatchSet: 1 Gerrit-Owner: Alexey Serbin <[email protected]>
