Alexey Serbin has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/16544 )

Change subject: [catalog_manager] Status::AlreadyPresent for range duplicates
......................................................................

[catalog_manager] Status::AlreadyPresent for range duplicates

With this patch, CatalogManager discriminates between overlapped
and exact duplicate key ranges when adding new partitions, returning
Status::AlreadyPresent() for exact range duplicates and
Status::InvalidArgument for otherwise overlapped ones.  The number
of hash buckets is not taken into account when searching/reporting
about the exact duplicates in key range for partitions.

Before this patch, CatalogManager returned Status::InvalidArgument()
for exact duplicates and otherwise overlapped ranges as well.

This patch also updates the relevant tests, so the new behavior
has enough test coverage.

A follow-up patch will use the newly introduced finer status reporting.
To be more precise, TxnManager could send multiple requests to add the
same new tablet for the transaction status table while processing
concurrent BeginTransaction() requests. With that, it should be able
to tell between an error when the corresponding tablet is already
present and other types of errors.

Change-Id: I42c1b821f3bd6854c06682ae3c85a058665f1489
Reviewed-on: http://gerrit.cloudera.org:8080/16544
Tested-by: Kudu Jenkins
Reviewed-by: Andrew Wong <aw...@cloudera.com>
---
M java/kudu-client/src/test/java/org/apache/kudu/client/TestAlterTable.java
M src/kudu/integration-tests/alter_table-test.cc
M src/kudu/integration-tests/txn_status_table-itest.cc
M src/kudu/master/catalog_manager.cc
4 files changed, 148 insertions(+), 102 deletions(-)

Approvals:
  Kudu Jenkins: Verified
  Andrew Wong: Looks good to me, approved

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I42c1b821f3bd6854c06682ae3c85a058665f1489
Gerrit-Change-Number: 16544
Gerrit-PatchSet: 4
Gerrit-Owner: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <abu...@apache.org>
Gerrit-Reviewer: Hao Hao <hao....@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mre...@cloudera.com>

Reply via email to