You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Adar Dembo (Code Review)" <ge...@cloudera.org> on 2019/10/21 05:53:55 UTC

[kudu-CR] consensus peers: make RpcPeerProxy::StartElection async and other cleanup

Hello Alexey Serbin, Kudu Jenkins, Andrew Wong, 

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

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

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

Change subject: consensus_peers: make RpcPeerProxy::StartElection async and other cleanup
......................................................................

consensus_peers: make RpcPeerProxy::StartElection async and other cleanup

It was the only such proxy call that was synchronous. Apart from violating
POLA, the synchronicity meant that the graceful leadership transfer code
path occupied a Raft threadpool slot for longer in order to receive the RPC
response. It's not a hot path so this is by no means a perf improvement, but
it just seemed unnecessary given that it was only used to log a warning in
the rare event that the remote couldn't start an election.

Changing this meant adding some extra lifecycle code to Peer::StartElection,
but I think it's still a net improvement in clarity.

Along the way I also did some other C++11 cleanup.

Change-Id: I6a6df610f1c07adae5a85534d8c6dec324801042
---
M src/kudu/consensus/consensus-test-util.h
M src/kudu/consensus/consensus_peers.cc
M src/kudu/consensus/consensus_peers.h
M src/kudu/consensus/leader_election.cc
M src/kudu/consensus/peer_manager.cc
5 files changed, 134 insertions(+), 112 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/12/14512/2
-- 
To view, visit http://gerrit.cloudera.org:8080/14512
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6a6df610f1c07adae5a85534d8c6dec324801042
Gerrit-Change-Number: 14512
Gerrit-PatchSet: 2
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)