Hello Mike Percy,

I'd like you to do a code review.  Please visit

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

to review the following change.

Change subject: raft_consensus: avoid some unecessary allocations in hot path
......................................................................

raft_consensus: avoid some unecessary allocations in hot path

In the stress cluster I noticed that UpdateConsensus does a lot of
allocation in LockForUpdate. In particular, it was constructing a
ConsensusStatusPB just to check whether it was currently a voter, and
that only to provide a log message. That PB has a lot of various strings
and other objects inside of it which caused unnecessary allocation.

We can already get this same information from the existing RaftConfigPB
object in ConsensusMeta, and a lot cheaper.

Change-Id: I75abcaaaed281e5ac1768ea3014064925db6c030
---
M src/kudu/consensus/raft_consensus_state.cc
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/44/5344/1
-- 
To view, visit http://gerrit.cloudera.org:8080/5344
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I75abcaaaed281e5ac1768ea3014064925db6c030
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <t...@apache.org>
Gerrit-Reviewer: Mike Percy <mpe...@apache.org>

Reply via email to