Alexey Serbin has uploaded this change for review. ( 
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
---
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
3 files changed, 128 insertions(+), 90 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/44/16544/1
--
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: newchange
Gerrit-Change-Id: I42c1b821f3bd6854c06682ae3c85a058665f1489
Gerrit-Change-Number: 16544
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <[email protected]>

Reply via email to