Mike Percy has posted comments on this change.

Change subject: KUDU-1500: Data race in 
RaftConsensusITest.TestCorruptReplicaMetadata
......................................................................


Patch Set 15:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/3823/15/src/kudu/tablet/tablet_metadata.cc
File src/kudu/tablet/tablet_metadata.cc:

PS15, Line 313:       DCHECK_EQ(table_id_, superblock.table_id());
              :       PartitionSchemaPB partition_schema_pb;
              :       partition_schema_.ToPB(&partition_schema_pb);
              :       
DCHECK_EQ(superblock.partition_schema().SerializeAsString(),
              :                 partition_schema_pb.SerializeAsString());
              :       PartitionPB partition_pb;
              :       partition_.ToPB(&partition_pb);
              :       DCHECK_EQ(superblock.partition().SerializeAsString(),
              :                 partition_pb.SerializeAsString());
> I understand that this code isn't executed in release mode, but I feel fair
Well, it looks like we already have PartitionSchema::Equals() so maybe we just 
need to implement Partition::Equals() to do this without comparing protobuf 
encodings. We could have something like:

 PartitionNSchema s;
 RETURN_NOT_OK(PartitionSchema::FromPB(superblock.partition_schema(), &s));
 DCHECK(partition_schema_.Equals(s));

And something similar for Partition.

In general I'm mostly concerned with forward and backward compatibility in 
release mode, although also maintaining it for DEBUG builds clearly would be 
nice. I think writing automated upgrade / downgrade tests would also help 
detect problems before release.


-- 
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: 15
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dinesh Bhat <din...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <a...@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

Reply via email to