Mike Percy has posted comments on this change. Change subject: KUDU-1500: Data race in RaftConsensusITest.TestCorruptReplicaMetadata ......................................................................
Patch Set 4: (3 comments) http://gerrit.cloudera.org:8080/#/c/3823/4/src/kudu/tablet/tablet_metadata.h File src/kudu/tablet/tablet_metadata.h: Line 104: const Partition& partition() const { Typically when we create functions like this we name them like: GetPartitionUnlocked() GetPartitionCopy() And add thread-safety comments to them. I'd even suggest going one step further. Have Tablet keep a copy of the Partition field locally when it's constructed and never access it from the TabletMetadata after that. That way all the calls that looks like tablet->metadata()->partition_locked() etc will just look like tablet->partition() and they don't have to worry about taking locks or copying. Line 142: const PartitionSchema partition_schema_locked() const { I don't think this is needed anymore if we make PartitionSchema::PartitionDebugString() static http://gerrit.cloudera.org:8080/#/c/3823/4/src/kudu/tserver/tserver-path-handlers.cc File src/kudu/tserver/tserver-path-handlers.cc: Line 209: string partition = peer->tablet_metadata()->partition_schema_locked() Can we just make PartitionSchema::PartitionDebugString() a static method? -- To view, visit http://gerrit.cloudera.org:8080/3823 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: If57617e22b41296b8d4e8ad131220f1ebb235019 Gerrit-PatchSet: 4 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Dinesh Bhat <din...@cloudera.com> Gerrit-Reviewer: Dan Burkert <d...@cloudera.com> Gerrit-Reviewer: Dinesh Bhat <din...@cloudera.com> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Mike Percy <mpe...@apache.org> Gerrit-Reviewer: Todd Lipcon <t...@apache.org> Gerrit-HasComments: Yes