Alexey Serbin has submitted this change and it was merged. ( 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 Reviewed-on: http://gerrit.cloudera.org:8080/18793 Tested-by: Kudu Jenkins Reviewed-by: Mahesh Reddy <[email protected]> Reviewed-by: Abhishek Chennaka <[email protected]> Reviewed-by: Attila Bukor <[email protected]> --- 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(-) Approvals: Kudu Jenkins: Verified Mahesh Reddy: Looks good to me, but someone else must approve Abhishek Chennaka: Looks good to me, but someone else must approve Attila Bukor: Looks good to me, approved -- 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: merged Gerrit-Change-Id: I33a2bdea2e71bf4b567664c0166e9fbc07c4b882 Gerrit-Change-Number: 18793 Gerrit-PatchSet: 2 Gerrit-Owner: Alexey Serbin <[email protected]> Gerrit-Reviewer: Abhishek Chennaka <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Attila Bukor <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Mahesh Reddy <[email protected]>
