Todd Lipcon has posted comments on this change. Change subject: Make ConsensusMetadata thread-safe ......................................................................
Patch Set 6: (3 comments) http://gerrit.cloudera.org:8080/#/c/6958/6/src/kudu/consensus/consensus_meta.h File src/kudu/consensus/consensus_meta.h: Line 99: RaftConfigPB committed_config() const; If this returns a copy of a heavy-weight PB it should be renamed to CommittedConfig. More broadly, I'm concerned that this may actually be a perf issue. For example see e14b82496da992c40af3fbf2c24a97f38b1d96cc in which I changed to using 'cmeta_->active_config()' specifically to avoid reallocating/copying the RaftConfigPB. I think this will regress that change and potentially introduce other problematic cases. Not sure if that's the only case of a hot-path call into this but the PBs are pretty heavy-weight to copy on every UpdateConsensus call. (I think it's fine if they get copied during voting/election/etc since those are rare) Line 106: RaftConfigPB pending_config() const; same Line 114: RaftConfigPB active_config() const; same -- To view, visit http://gerrit.cloudera.org:8080/6958 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id2c70605c0593e55486184705ea448dcb4bef2d7 Gerrit-PatchSet: 6 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Mike Percy <mpe...@apache.org> Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: David Ribeiro Alves <davidral...@gmail.com> Gerrit-Reviewer: Mike Percy <mpe...@apache.org> Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon <t...@apache.org> Gerrit-HasComments: Yes