You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Alexey Serbin (Code Review)" <ge...@cloudera.org> on 2022/06/02 03:23:44 UTC
[kudu-CR] KUDU-2671 refactor PartitionSchema::CreatePartitions()
Alexey Serbin has uploaded this change for review. ( http://gerrit.cloudera.org:8080/18582
Change subject: KUDU-2671 refactor PartitionSchema::CreatePartitions()
......................................................................
KUDU-2671 refactor PartitionSchema::CreatePartitions()
This patch refactors the code of the PartitionSchema::CreatePartitions()
method and the code around its invocations, addressing a few TODOs.
As a consequence, this patch fixes a bug in the CreateTable path: prior
to this patch, a client could submit a CreateTableRequestPB request such
that the order of ranges in CreateTableRequestPB::split_rows_range_bounds
and CreateTableRequestPB::partition_schema::custom_hash_schema_ranges
were different, and the result table would be created with wrong hash
schemas.
For example:
requested:
{{range_boundary_a0, range_boundary_a1}, hash_schema_a}
{{range_boundary_b0, range_boundary_b1}, hash_schema_b}
created:
{{range_boundary_a0, range_boundary_a1}, hash_schema_b}
{{range_boundary_b0, range_boundary_b1}, hash_schema_a}
I'm planning to add corresponding test scenario to catch the regressions
in a separate changelist for ease of reviewing and tracking the changes.
However, I updated the existing test scenarios affected by this change.
Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
---
M src/kudu/common/partition-test.cc
M src/kudu/common/partition.cc
M src/kudu/common/partition.h
M src/kudu/common/partition_pruner-test.cc
M src/kudu/common/scan_spec-test.cc
M src/kudu/integration-tests/ts_tablet_manager-itest.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/master/master-test.cc
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet-harness.h
M src/kudu/tserver/tablet_server-test.cc
11 files changed, 361 insertions(+), 375 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/82/18582/1
--
To view, visit http://gerrit.cloudera.org:8080/18582
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
Gerrit-Change-Number: 18582
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
[kudu-CR] KUDU-2671 refactor PartitionSchema::CreatePartitions()
Posted by "Mahesh Reddy (Code Review)" <ge...@cloudera.org>.
Mahesh Reddy has posted comments on this change. ( http://gerrit.cloudera.org:8080/18582 )
Change subject: KUDU-2671 refactor PartitionSchema::CreatePartitions()
......................................................................
Patch Set 5:
(4 comments)
http://gerrit.cloudera.org:8080/#/c/18582/5/src/kudu/common/partition.h
File src/kudu/common/partition.h:
http://gerrit.cloudera.org:8080/#/c/18582/5/src/kudu/common/partition.h@332
PS5, Line 332: 'ranges_with_hash_schemas
nit: add last underscore so 'ranges_with_hash_schemas_'. Maybe add something to signify that it's a field of PartitionSchema as well.
http://gerrit.cloudera.org:8080/#/c/18582/5/src/kudu/common/partition.cc
File src/kudu/common/partition.cc:
http://gerrit.cloudera.org:8080/#/c/18582/5/src/kudu/common/partition.cc@531
PS5, Line 531: hash_schema_}
Should we make a similar change in EncodeRangeBounds for the ranges without custom hash schemas instead of relying on empty vectors?
http://gerrit.cloudera.org:8080/#/c/18582/5/src/kudu/master/catalog_manager.cc
File src/kudu/master/catalog_manager.cc:
http://gerrit.cloudera.org:8080/#/c/18582/5/src/kudu/master/catalog_manager.cc@1931
PS5, Line 1931: const auto ranges_with_hash_schemas_size =
: partition_schema.ranges_with_hash_schemas().size()
nit: Any reason why this isn't outside of the if condition? I understand the scope is only within the if condition but just asking since it caught my eye as it looks odd.
http://gerrit.cloudera.org:8080/#/c/18582/5/src/kudu/master/catalog_manager.cc@2670
PS5, Line 2670: RETURN_NOT_OK(partition_schema.CreatePartitions(
: {}, {{ *ops[0].split_row, *ops[1].split_row }}, schema, &partitions));
How does adding a range with a custom hash schema work now? It's unclear how the partitions will be created for a new range with a custom hash schema as it doesn't seem like there's a way to propagate the custom hash schema to CreatePartitions() with these changes.
--
To view, visit http://gerrit.cloudera.org:8080/18582
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
Gerrit-Change-Number: 18582
Gerrit-PatchSet: 5
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Fri, 03 Jun 2022 22:32:36 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-2671 refactor PartitionSchema::CreatePartitions()
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Hello Mahesh Reddy, Tidy Bot, Attila Bukor, Kudu Jenkins, Abhishek Chennaka,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/18582
to look at the new patch set (#7).
Change subject: KUDU-2671 refactor PartitionSchema::CreatePartitions()
......................................................................
KUDU-2671 refactor PartitionSchema::CreatePartitions()
This patch refactors the code of the PartitionSchema::CreatePartitions()
method and the code around its invocations, addressing a few TODOs.
As a consequence, this patch fixes a bug in the CreateTable path: prior
to this patch, a client could submit a CreateTableRequestPB request such
that the order of ranges in CreateTableRequestPB::split_rows_range_bounds
and CreateTableRequestPB::partition_schema::custom_hash_schema_ranges
were different, and the result table would be created with wrong hash
schemas.
For example:
requested:
{{range_boundary_a0, range_boundary_a1}, hash_schema_a}
{{range_boundary_b0, range_boundary_b1}, hash_schema_b}
created:
{{range_boundary_a0, range_boundary_a1}, hash_schema_b}
{{range_boundary_b0, range_boundary_b1}, hash_schema_a}
I'm planning to add corresponding test scenario to catch the regressions
in a separate changelist for ease of reviewing and tracking the changes.
However, I updated the existing test scenarios affected by this change.
Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
---
M src/kudu/common/partition-test.cc
M src/kudu/common/partition.cc
M src/kudu/common/partition.h
M src/kudu/common/partition_pruner-test.cc
M src/kudu/common/scan_spec-test.cc
M src/kudu/integration-tests/ts_tablet_manager-itest.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/master/master-test.cc
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet-harness.h
M src/kudu/tserver/tablet_server-test.cc
11 files changed, 526 insertions(+), 576 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/82/18582/7
--
To view, visit http://gerrit.cloudera.org:8080/18582
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
Gerrit-Change-Number: 18582
Gerrit-PatchSet: 7
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
[kudu-CR] KUDU-2671 refactor PartitionSchema::CreatePartitions()
Posted by "Attila Bukor (Code Review)" <ge...@cloudera.org>.
Attila Bukor has posted comments on this change. ( http://gerrit.cloudera.org:8080/18582 )
Change subject: KUDU-2671 refactor PartitionSchema::CreatePartitions()
......................................................................
Patch Set 8: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/18582
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
Gerrit-Change-Number: 18582
Gerrit-PatchSet: 8
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Tue, 14 Jun 2022 16:21:53 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-2671 refactor PartitionSchema::CreatePartitions()
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Hello Mahesh Reddy, Tidy Bot, Attila Bukor, Kudu Jenkins, Abhishek Chennaka,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/18582
to look at the new patch set (#5).
Change subject: KUDU-2671 refactor PartitionSchema::CreatePartitions()
......................................................................
KUDU-2671 refactor PartitionSchema::CreatePartitions()
This patch refactors the code of the PartitionSchema::CreatePartitions()
method and the code around its invocations, addressing a few TODOs.
As a consequence, this patch fixes a bug in the CreateTable path: prior
to this patch, a client could submit a CreateTableRequestPB request such
that the order of ranges in CreateTableRequestPB::split_rows_range_bounds
and CreateTableRequestPB::partition_schema::custom_hash_schema_ranges
were different, and the result table would be created with wrong hash
schemas.
For example:
requested:
{{range_boundary_a0, range_boundary_a1}, hash_schema_a}
{{range_boundary_b0, range_boundary_b1}, hash_schema_b}
created:
{{range_boundary_a0, range_boundary_a1}, hash_schema_b}
{{range_boundary_b0, range_boundary_b1}, hash_schema_a}
I'm planning to add corresponding test scenario to catch the regressions
in a separate changelist for ease of reviewing and tracking the changes.
However, I updated the existing test scenarios affected by this change.
Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
---
M src/kudu/common/partition-test.cc
M src/kudu/common/partition.cc
M src/kudu/common/partition.h
M src/kudu/common/partition_pruner-test.cc
M src/kudu/common/scan_spec-test.cc
M src/kudu/integration-tests/ts_tablet_manager-itest.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/master/master-test.cc
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet-harness.h
M src/kudu/tserver/tablet_server-test.cc
11 files changed, 467 insertions(+), 544 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/82/18582/5
--
To view, visit http://gerrit.cloudera.org:8080/18582
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
Gerrit-Change-Number: 18582
Gerrit-PatchSet: 5
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
[kudu-CR] KUDU-2671 refactor PartitionSchema::CreatePartitions()
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/18582 )
Change subject: KUDU-2671 refactor PartitionSchema::CreatePartitions()
......................................................................
Patch Set 5:
(4 comments)
http://gerrit.cloudera.org:8080/#/c/18582/5/src/kudu/common/partition.h
File src/kudu/common/partition.h:
http://gerrit.cloudera.org:8080/#/c/18582/5/src/kudu/common/partition.h@332
PS5, Line 332: 'ranges_with_hash_schemas
> nit: add last underscore so 'ranges_with_hash_schemas_'. Maybe add somethin
Done
http://gerrit.cloudera.org:8080/#/c/18582/5/src/kudu/common/partition.cc
File src/kudu/common/partition.cc:
http://gerrit.cloudera.org:8080/#/c/18582/5/src/kudu/common/partition.cc@531
PS5, Line 531: hash_schema_}
> Should we make a similar change in EncodeRangeBounds for the ranges without
Good point. Done.
http://gerrit.cloudera.org:8080/#/c/18582/5/src/kudu/master/catalog_manager.cc
File src/kudu/master/catalog_manager.cc:
http://gerrit.cloudera.org:8080/#/c/18582/5/src/kudu/master/catalog_manager.cc@1931
PS5, Line 1931: const auto ranges_with_hash_schemas_size =
: partition_schema.ranges_with_hash_schemas().size()
> nit: Any reason why this isn't outside of the if condition? I understand th
It's not used outside of the condition, so I wanted to keep it only in the scope. C++17 allows for that, so why not?
http://gerrit.cloudera.org:8080/#/c/18582/5/src/kudu/master/catalog_manager.cc@2670
PS5, Line 2670: RETURN_NOT_OK(partition_schema.CreatePartitions(
: {}, {{ *ops[0].split_row, *ops[1].split_row }}, schema, &partitions));
> How does adding a range with a custom hash schema work now? It's unclear ho
It's a good question, but that's out of the scope of this changelist, I guess. That should be addressed by https://gerrit.cloudera.org/#/c/18515/ or other corresponding changelist.
A couple of options:
(a) add PartitionSchema::FromPB() overload to take a parameter of the AlterTableRequestPB type, and then call PartitionSchema::CreatePartitions(const Schema&, std::vector<Partition>*).
(b) add an extra overload for PartitionSchema::CreatePartitions() which takes range and its custom schema as input.
--
To view, visit http://gerrit.cloudera.org:8080/18582
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
Gerrit-Change-Number: 18582
Gerrit-PatchSet: 5
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Sat, 04 Jun 2022 01:18:12 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-2671 refactor PartitionSchema::CreatePartitions()
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has removed a vote on this change.
Change subject: KUDU-2671 refactor PartitionSchema::CreatePartitions()
......................................................................
Removed Verified-1 by Kudu Jenkins (120)
--
To view, visit http://gerrit.cloudera.org:8080/18582
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: deleteVote
Gerrit-Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
Gerrit-Change-Number: 18582
Gerrit-PatchSet: 5
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
[kudu-CR] KUDU-2671 refactor PartitionSchema::CreatePartitions()
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/18582 )
Change subject: KUDU-2671 refactor PartitionSchema::CreatePartitions()
......................................................................
Patch Set 4:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/18582/4/src/kudu/common/partition-test.cc
File src/kudu/common/partition-test.cc:
http://gerrit.cloudera.org:8080/#/c/18582/4/src/kudu/common/partition-test.cc@1349
PS4, Line 1349: EXPECT_EQ(string("", 0), partitions[10].end().ToString());
> warning: constructor creating an empty string [bugprone-string-constructor]
Done
--
To view, visit http://gerrit.cloudera.org:8080/18582
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
Gerrit-Change-Number: 18582
Gerrit-PatchSet: 4
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Fri, 03 Jun 2022 19:08:34 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-2671 refactor PartitionSchema::CreatePartitions()
Posted by "Abhishek Chennaka (Code Review)" <ge...@cloudera.org>.
Abhishek Chennaka has posted comments on this change. ( http://gerrit.cloudera.org:8080/18582 )
Change subject: KUDU-2671 refactor PartitionSchema::CreatePartitions()
......................................................................
Patch Set 6: Code-Review+1
--
To view, visit http://gerrit.cloudera.org:8080/18582
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
Gerrit-Change-Number: 18582
Gerrit-PatchSet: 6
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Thu, 09 Jun 2022 15:50:45 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-2671 refactor PartitionSchema::CreatePartitions()
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/18582 )
Change subject: KUDU-2671 refactor PartitionSchema::CreatePartitions()
......................................................................
KUDU-2671 refactor PartitionSchema::CreatePartitions()
This patch refactors the code of the PartitionSchema::CreatePartitions()
method and the code around its invocations, addressing a few TODOs.
As a consequence, this patch fixes a bug in the CreateTable path: prior
to this patch, a client could submit a CreateTableRequestPB request such
that the order of ranges in CreateTableRequestPB::split_rows_range_bounds
and CreateTableRequestPB::partition_schema::custom_hash_schema_ranges
were different, and the result table would be created with wrong hash
schemas.
For example:
requested:
{{range_boundary_a0, range_boundary_a1}, hash_schema_a}
{{range_boundary_b0, range_boundary_b1}, hash_schema_b}
created:
{{range_boundary_a0, range_boundary_a1}, hash_schema_b}
{{range_boundary_b0, range_boundary_b1}, hash_schema_a}
I'm planning to add corresponding test scenario to catch the regressions
in a separate changelist for ease of reviewing and tracking the changes.
However, I updated the existing test scenarios affected by this change.
Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
Reviewed-on: http://gerrit.cloudera.org:8080/18582
Tested-by: Alexey Serbin <al...@apache.org>
Reviewed-by: Abhishek Chennaka <ac...@cloudera.com>
Reviewed-by: Attila Bukor <ab...@apache.org>
---
M src/kudu/common/partition-test.cc
M src/kudu/common/partition.cc
M src/kudu/common/partition.h
M src/kudu/common/partition_pruner-test.cc
M src/kudu/common/scan_spec-test.cc
M src/kudu/integration-tests/ts_tablet_manager-itest.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/master/master-test.cc
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet-harness.h
M src/kudu/tserver/tablet_server-test.cc
11 files changed, 531 insertions(+), 575 deletions(-)
Approvals:
Alexey Serbin: Verified
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/18582
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
Gerrit-Change-Number: 18582
Gerrit-PatchSet: 9
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
[kudu-CR] KUDU-2671 refactor PartitionSchema::CreatePartitions()
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Hello Mahesh Reddy, Tidy Bot, Attila Bukor, Kudu Jenkins, Abhishek Chennaka,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/18582
to look at the new patch set (#4).
Change subject: KUDU-2671 refactor PartitionSchema::CreatePartitions()
......................................................................
KUDU-2671 refactor PartitionSchema::CreatePartitions()
This patch refactors the code of the PartitionSchema::CreatePartitions()
method and the code around its invocations, addressing a few TODOs.
As a consequence, this patch fixes a bug in the CreateTable path: prior
to this patch, a client could submit a CreateTableRequestPB request such
that the order of ranges in CreateTableRequestPB::split_rows_range_bounds
and CreateTableRequestPB::partition_schema::custom_hash_schema_ranges
were different, and the result table would be created with wrong hash
schemas.
For example:
requested:
{{range_boundary_a0, range_boundary_a1}, hash_schema_a}
{{range_boundary_b0, range_boundary_b1}, hash_schema_b}
created:
{{range_boundary_a0, range_boundary_a1}, hash_schema_b}
{{range_boundary_b0, range_boundary_b1}, hash_schema_a}
I'm planning to add corresponding test scenario to catch the regressions
in a separate changelist for ease of reviewing and tracking the changes.
However, I updated the existing test scenarios affected by this change.
Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
---
M src/kudu/common/partition-test.cc
M src/kudu/common/partition.cc
M src/kudu/common/partition.h
M src/kudu/common/partition_pruner-test.cc
M src/kudu/common/scan_spec-test.cc
M src/kudu/integration-tests/ts_tablet_manager-itest.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/master/master-test.cc
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet-harness.h
M src/kudu/tserver/tablet_server-test.cc
11 files changed, 314 insertions(+), 378 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/82/18582/4
--
To view, visit http://gerrit.cloudera.org:8080/18582
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
Gerrit-Change-Number: 18582
Gerrit-PatchSet: 4
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
[kudu-CR] KUDU-2671 refactor PartitionSchema::CreatePartitions()
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Hello Mahesh Reddy, Tidy Bot, Attila Bukor, Kudu Jenkins, Abhishek Chennaka,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/18582
to look at the new patch set (#2).
Change subject: KUDU-2671 refactor PartitionSchema::CreatePartitions()
......................................................................
KUDU-2671 refactor PartitionSchema::CreatePartitions()
This patch refactors the code of the PartitionSchema::CreatePartitions()
method and the code around its invocations, addressing a few TODOs.
As a consequence, this patch fixes a bug in the CreateTable path: prior
to this patch, a client could submit a CreateTableRequestPB request such
that the order of ranges in CreateTableRequestPB::split_rows_range_bounds
and CreateTableRequestPB::partition_schema::custom_hash_schema_ranges
were different, and the result table would be created with wrong hash
schemas.
For example:
requested:
{{range_boundary_a0, range_boundary_a1}, hash_schema_a}
{{range_boundary_b0, range_boundary_b1}, hash_schema_b}
created:
{{range_boundary_a0, range_boundary_a1}, hash_schema_b}
{{range_boundary_b0, range_boundary_b1}, hash_schema_a}
I'm planning to add corresponding test scenario to catch the regressions
in a separate changelist for ease of reviewing and tracking the changes.
However, I updated the existing test scenarios affected by this change.
Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
---
M src/kudu/common/partition-test.cc
M src/kudu/common/partition.cc
M src/kudu/common/partition.h
M src/kudu/common/partition_pruner-test.cc
M src/kudu/common/scan_spec-test.cc
M src/kudu/integration-tests/ts_tablet_manager-itest.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/master/master-test.cc
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet-harness.h
M src/kudu/tserver/tablet_server-test.cc
11 files changed, 364 insertions(+), 378 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/82/18582/2
--
To view, visit http://gerrit.cloudera.org:8080/18582
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
Gerrit-Change-Number: 18582
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
[kudu-CR] KUDU-2671 refactor PartitionSchema::CreatePartitions()
Posted by "Mahesh Reddy (Code Review)" <ge...@cloudera.org>.
Mahesh Reddy has posted comments on this change. ( http://gerrit.cloudera.org:8080/18582 )
Change subject: KUDU-2671 refactor PartitionSchema::CreatePartitions()
......................................................................
Patch Set 6: Code-Review+1
(1 comment)
http://gerrit.cloudera.org:8080/#/c/18582/5/src/kudu/master/catalog_manager.cc
File src/kudu/master/catalog_manager.cc:
http://gerrit.cloudera.org:8080/#/c/18582/5/src/kudu/master/catalog_manager.cc@1931
PS5, Line 1931: const auto ranges_with_hash_schemas_size =
: partition_schema.ranges_with_hash_schemas().size()
> It's not used outside of the condition, so I wanted to keep it only in the
Ack
--
To view, visit http://gerrit.cloudera.org:8080/18582
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
Gerrit-Change-Number: 18582
Gerrit-PatchSet: 6
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Tue, 07 Jun 2022 20:34:14 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-2671 refactor PartitionSchema::CreatePartitions()
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/18582 )
Change subject: KUDU-2671 refactor PartitionSchema::CreatePartitions()
......................................................................
Patch Set 8:
(2 comments)
http://gerrit.cloudera.org:8080/#/c/18582/8/src/kudu/common/partition.cc
File src/kudu/common/partition.cc:
http://gerrit.cloudera.org:8080/#/c/18582/8/src/kudu/common/partition.cc@626
PS8, Line 626: Status PartitionSchema::CreatePartitions(const Schema& schema,
: vector<Partition>* partitions) const {
: return CreatePartitions(ranges_with_hash_schemas_, schema, partitions);
: }
> Why is this method necessary? Why can't we just directly call the CreatePar
Yep, that's an option. I entertained that one as well, but I also hoped it would be possible to make such method static. But that's not the case, and I also plan to make PartionSchema::ranges_with_hash_schemas() private eventually (right now it's used only in tests, as I can see). With that, I decided to add this method.
I guess we have an opportunity to refactor PartitionSchema class further: that class contains too much logic of different sorts and has too many responsibilities.
http://gerrit.cloudera.org:8080/#/c/18582/8/src/kudu/master/catalog_manager.cc
File src/kudu/master/catalog_manager.cc:
http://gerrit.cloudera.org:8080/#/c/18582/8/src/kudu/master/catalog_manager.cc@2635
PS8, Line 2635: bouds
> nit:bounds
Thanks for pointing out at this! This nit is addressed in a follow-up patch: https://gerrit.cloudera.org/#/c/18615
To reduce the churn of code reviews, I'd keep it as is in this patch, knowing that the follow-up patch fixes the spelling.
--
To view, visit http://gerrit.cloudera.org:8080/18582
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
Gerrit-Change-Number: 18582
Gerrit-PatchSet: 8
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Tue, 14 Jun 2022 17:13:19 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-2671 refactor PartitionSchema::CreatePartitions()
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/18582 )
Change subject: KUDU-2671 refactor PartitionSchema::CreatePartitions()
......................................................................
Patch Set 5:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/18582/5/src/kudu/master/catalog_manager.cc
File src/kudu/master/catalog_manager.cc:
http://gerrit.cloudera.org:8080/#/c/18582/5/src/kudu/master/catalog_manager.cc@2670
PS5, Line 2670: RETURN_NOT_OK(partition_schema.CreatePartitions(
: {}, {{ *ops[0].split_row, *ops[1].split_row }}, schema, &partitions));
> +1
I guess I can explore the options I mentioned in my response. For example, I can add add PartitionSchema::FromPB(const AlterTableRequestPB&) and see how it goes.
--
To view, visit http://gerrit.cloudera.org:8080/18582
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
Gerrit-Change-Number: 18582
Gerrit-PatchSet: 5
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Sat, 04 Jun 2022 01:38:58 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-2671 refactor PartitionSchema::CreatePartitions()
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Hello Mahesh Reddy, Tidy Bot, Attila Bukor, Kudu Jenkins, Abhishek Chennaka,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/18582
to look at the new patch set (#3).
Change subject: KUDU-2671 refactor PartitionSchema::CreatePartitions()
......................................................................
KUDU-2671 refactor PartitionSchema::CreatePartitions()
This patch refactors the code of the PartitionSchema::CreatePartitions()
method and the code around its invocations, addressing a few TODOs.
As a consequence, this patch fixes a bug in the CreateTable path: prior
to this patch, a client could submit a CreateTableRequestPB request such
that the order of ranges in CreateTableRequestPB::split_rows_range_bounds
and CreateTableRequestPB::partition_schema::custom_hash_schema_ranges
were different, and the result table would be created with wrong hash
schemas.
For example:
requested:
{{range_boundary_a0, range_boundary_a1}, hash_schema_a}
{{range_boundary_b0, range_boundary_b1}, hash_schema_b}
created:
{{range_boundary_a0, range_boundary_a1}, hash_schema_b}
{{range_boundary_b0, range_boundary_b1}, hash_schema_a}
I'm planning to add corresponding test scenario to catch the regressions
in a separate changelist for ease of reviewing and tracking the changes.
However, I updated the existing test scenarios affected by this change.
Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
---
M src/kudu/common/partition-test.cc
M src/kudu/common/partition.cc
M src/kudu/common/partition.h
M src/kudu/common/partition_pruner-test.cc
M src/kudu/common/scan_spec-test.cc
M src/kudu/integration-tests/ts_tablet_manager-itest.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/master/master-test.cc
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet-harness.h
M src/kudu/tserver/tablet_server-test.cc
11 files changed, 312 insertions(+), 378 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/82/18582/3
--
To view, visit http://gerrit.cloudera.org:8080/18582
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
Gerrit-Change-Number: 18582
Gerrit-PatchSet: 3
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
[kudu-CR] KUDU-2671 refactor PartitionSchema::CreatePartitions()
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/18582 )
Change subject: KUDU-2671 refactor PartitionSchema::CreatePartitions()
......................................................................
Patch Set 5: Verified+1
unrelated build fart (TSAN configuration):
ERROR: Step ?Publish JUnit test result report? failed: Test reports were found but none of them are new. Did leafNodes run?
--
To view, visit http://gerrit.cloudera.org:8080/18582
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
Gerrit-Change-Number: 18582
Gerrit-PatchSet: 5
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Fri, 03 Jun 2022 19:52:59 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-2671 refactor PartitionSchema::CreatePartitions()
Posted by "Abhishek Chennaka (Code Review)" <ge...@cloudera.org>.
Abhishek Chennaka has posted comments on this change. ( http://gerrit.cloudera.org:8080/18582 )
Change subject: KUDU-2671 refactor PartitionSchema::CreatePartitions()
......................................................................
Patch Set 8: Code-Review+1
--
To view, visit http://gerrit.cloudera.org:8080/18582
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
Gerrit-Change-Number: 18582
Gerrit-PatchSet: 8
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Fri, 10 Jun 2022 15:18:13 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-2671 refactor PartitionSchema::CreatePartitions()
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has removed a vote on this change.
Change subject: KUDU-2671 refactor PartitionSchema::CreatePartitions()
......................................................................
Removed Verified-1 by Kudu Jenkins (120)
--
To view, visit http://gerrit.cloudera.org:8080/18582
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: deleteVote
Gerrit-Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
Gerrit-Change-Number: 18582
Gerrit-PatchSet: 8
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
[kudu-CR] KUDU-2671 refactor PartitionSchema::CreatePartitions()
Posted by "Mahesh Reddy (Code Review)" <ge...@cloudera.org>.
Mahesh Reddy has posted comments on this change. ( http://gerrit.cloudera.org:8080/18582 )
Change subject: KUDU-2671 refactor PartitionSchema::CreatePartitions()
......................................................................
Patch Set 8:
(2 comments)
http://gerrit.cloudera.org:8080/#/c/18582/8/src/kudu/common/partition.cc
File src/kudu/common/partition.cc:
http://gerrit.cloudera.org:8080/#/c/18582/8/src/kudu/common/partition.cc@626
PS8, Line 626: Status PartitionSchema::CreatePartitions(const Schema& schema,
: vector<Partition>* partitions) const {
: return CreatePartitions(ranges_with_hash_schemas_, schema, partitions);
: }
Why is this method necessary? Why can't we just directly call the CreatePartitions() function signature with three parameters with partition_schema.ranges_with_hash_schemas() as the first parameter?
http://gerrit.cloudera.org:8080/#/c/18582/8/src/kudu/master/catalog_manager.cc
File src/kudu/master/catalog_manager.cc:
http://gerrit.cloudera.org:8080/#/c/18582/8/src/kudu/master/catalog_manager.cc@2635
PS8, Line 2635: bouds
nit:bounds
--
To view, visit http://gerrit.cloudera.org:8080/18582
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
Gerrit-Change-Number: 18582
Gerrit-PatchSet: 8
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Mon, 13 Jun 2022 22:48:19 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-2671 refactor PartitionSchema::CreatePartitions()
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Hello Mahesh Reddy, Tidy Bot, Attila Bukor, Kudu Jenkins, Abhishek Chennaka,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/18582
to look at the new patch set (#6).
Change subject: KUDU-2671 refactor PartitionSchema::CreatePartitions()
......................................................................
KUDU-2671 refactor PartitionSchema::CreatePartitions()
This patch refactors the code of the PartitionSchema::CreatePartitions()
method and the code around its invocations, addressing a few TODOs.
As a consequence, this patch fixes a bug in the CreateTable path: prior
to this patch, a client could submit a CreateTableRequestPB request such
that the order of ranges in CreateTableRequestPB::split_rows_range_bounds
and CreateTableRequestPB::partition_schema::custom_hash_schema_ranges
were different, and the result table would be created with wrong hash
schemas.
For example:
requested:
{{range_boundary_a0, range_boundary_a1}, hash_schema_a}
{{range_boundary_b0, range_boundary_b1}, hash_schema_b}
created:
{{range_boundary_a0, range_boundary_a1}, hash_schema_b}
{{range_boundary_b0, range_boundary_b1}, hash_schema_a}
I'm planning to add corresponding test scenario to catch the regressions
in a separate changelist for ease of reviewing and tracking the changes.
However, I updated the existing test scenarios affected by this change.
Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
---
M src/kudu/common/partition-test.cc
M src/kudu/common/partition.cc
M src/kudu/common/partition.h
M src/kudu/common/partition_pruner-test.cc
M src/kudu/common/scan_spec-test.cc
M src/kudu/integration-tests/ts_tablet_manager-itest.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/master/master-test.cc
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet-harness.h
M src/kudu/tserver/tablet_server-test.cc
11 files changed, 469 insertions(+), 546 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/82/18582/6
--
To view, visit http://gerrit.cloudera.org:8080/18582
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
Gerrit-Change-Number: 18582
Gerrit-PatchSet: 6
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
[kudu-CR] KUDU-2671 refactor PartitionSchema::CreatePartitions()
Posted by "Abhishek Chennaka (Code Review)" <ge...@cloudera.org>.
Abhishek Chennaka has posted comments on this change. ( http://gerrit.cloudera.org:8080/18582 )
Change subject: KUDU-2671 refactor PartitionSchema::CreatePartitions()
......................................................................
Patch Set 5:
(2 comments)
http://gerrit.cloudera.org:8080/#/c/18582/5/src/kudu/common/partition.h
File src/kudu/common/partition.h:
http://gerrit.cloudera.org:8080/#/c/18582/5/src/kudu/common/partition.h@289
PS5, Line 289: range
nit: "range partition" might be a bit clearer.
http://gerrit.cloudera.org:8080/#/c/18582/5/src/kudu/master/catalog_manager.cc
File src/kudu/master/catalog_manager.cc:
http://gerrit.cloudera.org:8080/#/c/18582/5/src/kudu/master/catalog_manager.cc@2670
PS5, Line 2670: RETURN_NOT_OK(partition_schema.CreatePartitions(
: {}, {{ *ops[0].split_row, *ops[1].split_row }}, schema, &partitions));
> How does adding a range with a custom hash schema work now? It's unclear ho
+1
Maybe pass the AlterTableRequestPB to CatalogManager::ApplyAlterPartitioningSteps and set the ranges_with_hash_schemas_
--
To view, visit http://gerrit.cloudera.org:8080/18582
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
Gerrit-Change-Number: 18582
Gerrit-PatchSet: 5
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Sat, 04 Jun 2022 01:11:47 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-2671 refactor PartitionSchema::CreatePartitions()
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Hello Mahesh Reddy, Tidy Bot, Attila Bukor, Kudu Jenkins, Abhishek Chennaka,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/18582
to look at the new patch set (#8).
Change subject: KUDU-2671 refactor PartitionSchema::CreatePartitions()
......................................................................
KUDU-2671 refactor PartitionSchema::CreatePartitions()
This patch refactors the code of the PartitionSchema::CreatePartitions()
method and the code around its invocations, addressing a few TODOs.
As a consequence, this patch fixes a bug in the CreateTable path: prior
to this patch, a client could submit a CreateTableRequestPB request such
that the order of ranges in CreateTableRequestPB::split_rows_range_bounds
and CreateTableRequestPB::partition_schema::custom_hash_schema_ranges
were different, and the result table would be created with wrong hash
schemas.
For example:
requested:
{{range_boundary_a0, range_boundary_a1}, hash_schema_a}
{{range_boundary_b0, range_boundary_b1}, hash_schema_b}
created:
{{range_boundary_a0, range_boundary_a1}, hash_schema_b}
{{range_boundary_b0, range_boundary_b1}, hash_schema_a}
I'm planning to add corresponding test scenario to catch the regressions
in a separate changelist for ease of reviewing and tracking the changes.
However, I updated the existing test scenarios affected by this change.
Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
---
M src/kudu/common/partition-test.cc
M src/kudu/common/partition.cc
M src/kudu/common/partition.h
M src/kudu/common/partition_pruner-test.cc
M src/kudu/common/scan_spec-test.cc
M src/kudu/integration-tests/ts_tablet_manager-itest.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/master/master-test.cc
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet-harness.h
M src/kudu/tserver/tablet_server-test.cc
11 files changed, 531 insertions(+), 575 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/82/18582/8
--
To view, visit http://gerrit.cloudera.org:8080/18582
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
Gerrit-Change-Number: 18582
Gerrit-PatchSet: 8
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
[kudu-CR] KUDU-2671 refactor PartitionSchema::CreatePartitions()
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/18582 )
Change subject: KUDU-2671 refactor PartitionSchema::CreatePartitions()
......................................................................
Patch Set 8:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/18582/7/src/kudu/common/partition.h
File src/kudu/common/partition.h:
http://gerrit.cloudera.org:8080/#/c/18582/7/src/kudu/common/partition.h@524
PS7, Line 524: // Create the set of partitions given the specified ranges with per-range
> nit: A comment for this function could be helpful and help maintain uniform
Done
--
To view, visit http://gerrit.cloudera.org:8080/18582
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
Gerrit-Change-Number: 18582
Gerrit-PatchSet: 8
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Thu, 09 Jun 2022 23:22:56 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-2671 refactor PartitionSchema::CreatePartitions()
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/18582 )
Change subject: KUDU-2671 refactor PartitionSchema::CreatePartitions()
......................................................................
Patch Set 8: Verified+1
unrelated test failure: DisableWriteWhenExceedingQuotaTest.TestDisableWritePrivilegeWhenExceedingSizeQuota
--
To view, visit http://gerrit.cloudera.org:8080/18582
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
Gerrit-Change-Number: 18582
Gerrit-PatchSet: 8
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Fri, 10 Jun 2022 01:30:43 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-2671 refactor PartitionSchema::CreatePartitions()
Posted by "Abhishek Chennaka (Code Review)" <ge...@cloudera.org>.
Abhishek Chennaka has posted comments on this change. ( http://gerrit.cloudera.org:8080/18582 )
Change subject: KUDU-2671 refactor PartitionSchema::CreatePartitions()
......................................................................
Patch Set 7: Code-Review+1
(1 comment)
http://gerrit.cloudera.org:8080/#/c/18582/7/src/kudu/common/partition.h
File src/kudu/common/partition.h:
http://gerrit.cloudera.org:8080/#/c/18582/7/src/kudu/common/partition.h@524
PS7, Line 524: Status CreatePartitions(
nit: A comment for this function could be helpful and help maintain uniformity
--
To view, visit http://gerrit.cloudera.org:8080/18582
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0
Gerrit-Change-Number: 18582
Gerrit-PatchSet: 7
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Thu, 09 Jun 2022 20:47:11 +0000
Gerrit-HasComments: Yes