New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dedicated retention lease exceptions #38754

Merged
merged 4 commits into from Feb 12, 2019

Conversation

Projects
None yet
4 participants
@jasontedor
Copy link
Member

jasontedor commented Feb 11, 2019

When a retention lease already exists on an add retention lease
invocation, or a retention lease is not found on a renew retention lease
invocation today we throw an illegal argument exception. This puts a
burden on the caller to catch that specific exception and parse the
message. This commit relieves the burden from the caller by adding
dedicated exception types for these situations.

Relates #37165

Add dedicated retention lease exceptions
When a retention lease already exists on an add retention lease
invocation, or a retention lease is not found on a renew retention lease
invocation today we throw an illegal argument exception. This puts a
burden on the caller to catch that specific exception and parse the
message. This commit relieves the burden from the caller by adding
dedicated exception types for these situations.
@elasticmachine

This comment has been minimized.

Copy link

elasticmachine commented Feb 11, 2019

@jasontedor

This comment has been minimized.

Copy link
Member Author

jasontedor commented Feb 11, 2019

I will adapt this to #38751 after #38751 is merged. That is, removing a retention lease that does not exist should throw a RetentionLeaseNotFoundException.

@dnhatn

dnhatn approved these changes Feb 11, 2019

Copy link
Contributor

dnhatn left a comment

LGTM.

@jasontedor

This comment has been minimized.

Copy link
Member Author

jasontedor commented Feb 12, 2019

Note that #38756 will be adapted to this PR after this PR is merged.

@jasontedor jasontedor referenced this pull request Feb 12, 2019

Open

Shard history retention leases #37165

19 of 24 tasks complete
@jasontedor

This comment has been minimized.

Copy link
Member Author

jasontedor commented Feb 12, 2019

@elasticmachine run elasticsearch-ci/1

jasontedor added some commits Feb 12, 2019

Merge branch 'master' into retention-lease-exceptions
* master:
  Enable removal of retention leases (#38751)
  Make the 'get templates' types deprecation message consistent. (#38533)
  Copy retention leases when trim unsafe commits (#37995)
  Fix the version check for LegacyGeoShapeFieldMapper (#38547)

@jasontedor jasontedor merged commit 0518ec9 into elastic:master Feb 12, 2019

7 checks passed

CLA Commit author is a member of Elasticsearch
Details
elasticsearch-ci/1 Build finished.
Details
elasticsearch-ci/2 Build finished.
Details
elasticsearch-ci/default-distro Build finished.
Details
elasticsearch-ci/docbldesx Build finished.
Details
elasticsearch-ci/oss-distro-docs Build finished.
Details
elasticsearch-ci/packaging-sample Build finished.
Details

jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Feb 12, 2019

Merge branch 'master' into retention-lease-actions
* master:
  Add dedicated retention lease exceptions (elastic#38754)
  add debug logging to SimpleClusterStateIT#testIndicesOptions (elastic#38752)

jasontedor added a commit that referenced this pull request Feb 12, 2019

Add dedicated retention lease exceptions (#38754)
When a retention lease already exists on an add retention lease
invocation, or a retention lease is not found on a renew retention lease
invocation today we throw an illegal argument exception. This puts a
burden on the caller to catch that specific exception and parse the
message. This commit relieves the burden from the caller by adding
dedicated exception types for these situations.

jasontedor added a commit that referenced this pull request Feb 12, 2019

Add dedicated retention lease exceptions (#38754)
When a retention lease already exists on an add retention lease
invocation, or a retention lease is not found on a renew retention lease
invocation today we throw an illegal argument exception. This puts a
burden on the caller to catch that specific exception and parse the
message. This commit relieves the burden from the caller by adding
dedicated exception types for these situations.

jasontedor added a commit that referenced this pull request Feb 12, 2019

Add dedicated retention lease exceptions (#38754)
When a retention lease already exists on an add retention lease
invocation, or a retention lease is not found on a renew retention lease
invocation today we throw an illegal argument exception. This puts a
burden on the caller to catch that specific exception and parse the
message. This commit relieves the burden from the caller by adding
dedicated exception types for these situations.

@jasontedor jasontedor deleted the jasontedor:retention-lease-exceptions branch Feb 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment