Skip to content

Commit

Permalink
fix repo missing case
Browse files Browse the repository at this point in the history
  • Loading branch information
original-brownbear committed May 18, 2021
1 parent 28eea50 commit fb55daa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 0 additions & 1 deletion docs/reference/modules/threadpool.asciidoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

[[modules-threadpool]]
=== Thread pools

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.elasticsearch.repositories.RepositoriesService;
import org.elasticsearch.repositories.Repository;
import org.elasticsearch.repositories.RepositoryData;
import org.elasticsearch.repositories.RepositoryMissingException;
import org.elasticsearch.snapshots.SnapshotException;
import org.elasticsearch.snapshots.SnapshotId;
import org.elasticsearch.snapshots.SnapshotInfo;
Expand Down Expand Up @@ -285,7 +286,13 @@ private void snapshots(SnapshotsInProgress snapshotsInProgress,
// anyway in this case
l.onFailure(e);
});
final Repository repository = repositoriesService.repository(repositoryName);
final Repository repository;
try {
repository = repositoriesService.repository(repositoryName);
} catch (RepositoryMissingException e) {
listener.onFailure(e);
return;
}
for (int i = 0; i < workers; i++) {
getOneSnapshotInfo(
ignoreUnavailable,
Expand Down

0 comments on commit fb55daa

Please sign in to comment.