Don't throw an exception if repositories are unregister with match all

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
This commit is contained in:
Simon Willnauer 2015-05-12 09:34:57 +02:00
parent 6a43fe348d
commit 869baeea0c
1 changed files with 3 additions and 0 deletions

View File

@ -191,6 +191,9 @@ public class RepositoriesService extends AbstractComponent implements ClusterSta
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.
return currentState;
}
throw new RepositoryMissingException(request.name);
}