Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/17489 )
Change subject: [consensus] a small optimisation on log prefix ...................................................................... [consensus] a small optimisation on log prefix This patch introduces a small optimisation into the implementation of the RaftConsensus::LogPrefixThreadSafe() method: since the prefix it produces doesn't change, it's possible to construct the string once in the constructor and then return a constant reference. I also updated PendingRound class to store a reference to the prefix as well since instances of the PendingRound class have shorter live span than RaftConsensus objects which create PendingRound objects. Change-Id: I6a5082fe07449ef24827696638ddd8e925a08264 Reviewed-on: http://gerrit.cloudera.org:8080/17489 Tested-by: Alexey Serbin <[email protected]> Reviewed-by: Andrew Wong <[email protected]> --- M src/kudu/consensus/pending_rounds.cc M src/kudu/consensus/pending_rounds.h M src/kudu/consensus/raft_consensus.cc M src/kudu/consensus/raft_consensus.h 4 files changed, 16 insertions(+), 17 deletions(-) Approvals: Alexey Serbin: Verified Andrew Wong: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/17489 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I6a5082fe07449ef24827696638ddd8e925a08264 Gerrit-Change-Number: 17489 Gerrit-PatchSet: 2 Gerrit-Owner: Alexey Serbin <[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)
