Mahesh Reddy has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/17657 )

Change subject: [client] KUDU-2671 custom hash buckets API for table creation
......................................................................


Patch Set 8:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/17657/6/src/kudu/client/flex_partitioning_client-test.cc
File src/kudu/client/flex_partitioning_client-test.cc:

http://gerrit.cloudera.org:8080/#/c/17657/6/src/kudu/client/flex_partitioning_client-test.cc@200
PS6, Line 200:     NO_FATALS(CheckTabletCount(kTableName, 3));
> +1 about the server-side check.
Just looked through the code paths now. Looks like today we don't check client 
side and the hash bucket schemas are only validated server side in 
`PartitionSchema::FromPB()` after calling PartitionSchema::Validate()`.

Seems like the issue lies within how we populate per range hash schemas in 
CreateTableRequestPB. If we use the separate field 'ranges_hash_schemas', 
within CatalogManager::CreateTable() the hash bucket schemas are not validated 
when this field is decoded.

There are two potential solutions here:

1. Stop using the redundant extra field `ranges_hash_schemas` within 
CreateTableRequestPB and populate per range hash schemas using the 
`ranges_hash_schemas` field within PartitionSchemaPB within 
CreateTableRequestPB. This way, when PartitionSchemaPB is decoded the hash 
bucket schemas will be properly validated.

2. Add a validation check to where the range hash schemas are currently being 
decoded at 
(https://github.com/apache/kudu/blob/master/src/kudu/master/catalog_manager.cc#L1864).



--
To view, visit http://gerrit.cloudera.org:8080/17657
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I98fd9754db850dcdd00a00738f470673f42ac5b4
Gerrit-Change-Number: 17657
Gerrit-PatchSet: 8
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <[email protected]>
Gerrit-Comment-Date: Sat, 17 Jul 2021 06:20:40 +0000
Gerrit-HasComments: Yes

Reply via email to