Alexey Serbin has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/14943 )

Change subject: [consensus] respond lock-free to RequestVote() if busy
......................................................................

[consensus] respond lock-free to RequestVote() if busy

I saw cases of contention on replica's RaftConsensus lock when the
filesystem was slow on updating Raft metadata files to record a vote
that has just been granted by the replica.  As it turned out, the fast
path was also acquiring the RaftConsensus object lock, but it's easy
to avoid that.

This patch updates the code by not acquiring the lock in such cases.
It should help a bit with overflowing of the RaftConsensus RPC queue.

In addition, I turned the LOG(INFO) message about this event into
VLOG(1) since it's not so important to report about such events on the
responder side: its state doesn't change upon responding with
ServiceUnavailable anyways.  Other minor clean-up.

Change-Id: I95d5cbe455fefc4cdc540ee1e7b69e1f21b6ebc0
Reviewed-on: http://gerrit.cloudera.org:8080/14943
Tested-by: Alexey Serbin <[email protected]>
Reviewed-by: Bankim Bhavsar <[email protected]>
Reviewed-by: Adar Dembo <[email protected]>
---
M src/kudu/consensus/raft_consensus.cc
M src/kudu/consensus/raft_consensus.h
2 files changed, 59 insertions(+), 33 deletions(-)

Approvals:
  Alexey Serbin: Verified
  Bankim Bhavsar: Looks good to me, but someone else must approve
  Adar Dembo: Looks good to me, approved

--
To view, visit http://gerrit.cloudera.org:8080/14943
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I95d5cbe455fefc4cdc540ee1e7b69e1f21b6ebc0
Gerrit-Change-Number: 14943
Gerrit-PatchSet: 6
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Bankim Bhavsar <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)

Reply via email to