Skip to content
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

Don't throw an exception if repositories are unregistered with * #11113

Merged
merged 1 commit into from May 13, 2015

Conversation

s1monw
Copy link
Contributor

@s1monw s1monw commented May 12, 2015

Today we barf if repositories are unregistered with a * pattern. This
happens on almost every test and adds weird log messages. I dont' think
we should barf in that case.

@s1monw s1monw added >enhancement v2.0.0-beta1 review :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs v1.6.0 labels May 12, 2015
@s1monw
Copy link
Contributor Author

s1monw commented May 12, 2015

@imotov can you take a look at this?

@@ -190,6 +190,9 @@ public ClusterState execute(ClusterState currentState) {
mdBuilder.putCustom(RepositoriesMetaData.TYPE, repositories);
return ClusterState.builder(currentState).metaData(mdBuilder).build();
}
if (Regex.isMatchAllPattern(request.name)) { // we use a wildcard so we don't barf if it's not present.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code will be never executed. I think you meant to put it after the if statement where we check if we have any repositories registered.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

of course.. :)

@imotov imotov removed the review label May 12, 2015
@s1monw
Copy link
Contributor Author

s1monw commented May 13, 2015

pushed a new commit

@imotov
Copy link
Contributor

imotov commented May 13, 2015

LGTM

Today we barf if repositories are unregistered with a `*` pattern. This
happens on almost every test and adds weird log messages. I dont' think
we should barf in that case.

Closes elastic#11113
@s1monw s1monw force-pushed the delete_wildcard_repository branch from 9ae8427 to 869baee Compare May 13, 2015 15:01
@s1monw s1monw merged commit 869baee into elastic:master May 13, 2015
s1monw added a commit that referenced this pull request May 13, 2015
Today we barf if repositories are unregistered with a `*` pattern. This
happens on almost every test and adds weird log messages. I dont' think
we should barf in that case.

Closes #11113
@s1monw s1monw deleted the delete_wildcard_repository branch May 14, 2015 18:36
@clintongormley clintongormley changed the title Don't throw an exception if repositories are unregister with match all Don't throw an exception if repositories are unregistered with * Jun 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >enhancement v1.6.0 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants