Grant Henke has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/17512 )
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]> (cherry picked from commit 8ffa18196dcd3917ae624f9dc9679040e65967cb) Reviewed-on: http://gerrit.cloudera.org:8080/17512 Tested-by: Kudu Jenkins Reviewed-by: Bankim Bhavsar <[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: Kudu Jenkins: Verified Bankim Bhavsar: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/17512 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: branch-1.15.x Gerrit-MessageType: merged Gerrit-Change-Id: I6a5082fe07449ef24827696638ddd8e925a08264 Gerrit-Change-Number: 17512 Gerrit-PatchSet: 2 Gerrit-Owner: Grant Henke <[email protected]> Gerrit-Reviewer: Bankim Bhavsar <[email protected]> Gerrit-Reviewer: Grant Henke <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120)
