You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Grant Henke (Code Review)" <ge...@cloudera.org> on 2021/05/26 02:37:30 UTC
[kudu-CR](branch-1.15.x) [consensus] a small optimisation on log prefix
Grant Henke has uploaded this change for review. ( 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 <as...@cloudera.com>
Reviewed-by: Andrew Wong <aw...@cloudera.com>
(cherry picked from commit 8ffa18196dcd3917ae624f9dc9679040e65967cb)
---
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(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/12/17512/1
--
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: newchange
Gerrit-Change-Id: I6a5082fe07449ef24827696638ddd8e925a08264
Gerrit-Change-Number: 17512
Gerrit-PatchSet: 1
Gerrit-Owner: Grant Henke <gr...@apache.org>
[kudu-CR](branch-1.15.x) [consensus] a small optimisation on log prefix
Posted by "Bankim Bhavsar (Code Review)" <ge...@cloudera.org>.
Bankim Bhavsar has posted comments on this change. ( http://gerrit.cloudera.org:8080/17512 )
Change subject: [consensus] a small optimisation on log prefix
......................................................................
Patch Set 1: Code-Review+2
--
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: comment
Gerrit-Change-Id: I6a5082fe07449ef24827696638ddd8e925a08264
Gerrit-Change-Number: 17512
Gerrit-PatchSet: 1
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Bankim Bhavsar <ba...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Wed, 26 May 2021 16:04:37 +0000
Gerrit-HasComments: No
[kudu-CR](branch-1.15.x) [consensus] a small optimisation on log prefix
Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
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 <as...@cloudera.com>
Reviewed-by: Andrew Wong <aw...@cloudera.com>
(cherry picked from commit 8ffa18196dcd3917ae624f9dc9679040e65967cb)
Reviewed-on: http://gerrit.cloudera.org:8080/17512
Tested-by: Kudu Jenkins
Reviewed-by: Bankim Bhavsar <ba...@cloudera.com>
---
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 <gr...@apache.org>
Gerrit-Reviewer: Bankim Bhavsar <ba...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)