Alexey Serbin has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/18793


Change subject: [catalog_manager] KUDU-2671 fix bug in 
CreatePartitionsForRange()
......................................................................

[catalog_manager] KUDU-2671 fix bug in CreatePartitionsForRange()

This patch fixes a bug in PartitionSchema::CreatePartitionsForRange().
The manifestation of the bug was the inability to add an unbounded range
with custom hash schema (e.g. [0, +inf)) by AlterTable due to a conflict
with already existing range (e.g., [-inf, 0)) when if fact there was no
conflict at all.  The root cause was the assumption that PartitionSchema
contained information on the range to be added in its internal map
'hash_schema_idx_by_encoded_range_start_' but that wasn't the case,
so GetHashSchemaForRange() would return the table-wide hash schema for
the new range being added instead of proper range-specific hash schema.
That lead to incorrect updating of range boundaries in
UpdatePartitionBoundaries(), producing wrong results.

This patch also contains a new test scenario that allowed to reproduce
the issue: the new scenario is failing without the fix applied.

Change-Id: I33a2bdea2e71bf4b567664c0166e9fbc07c4b882
---
M src/kudu/client/flex_partitioning_client-test.cc
M src/kudu/common/partition.cc
M src/kudu/common/partition.h
3 files changed, 137 insertions(+), 40 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/93/18793/1
--
To view, visit http://gerrit.cloudera.org:8080/18793
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I33a2bdea2e71bf4b567664c0166e9fbc07c4b882
Gerrit-Change-Number: 18793
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <[email protected]>

Reply via email to