Skip to content

Commit fb55daa

Browse files
fix repo missing case
1 parent 28eea50 commit fb55daa

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

docs/reference/modules/threadpool.asciidoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
[[modules-threadpool]]
32
=== Thread pools
43

server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/get/TransportGetSnapshotsAction.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import org.elasticsearch.repositories.RepositoriesService;
3434
import org.elasticsearch.repositories.Repository;
3535
import org.elasticsearch.repositories.RepositoryData;
36+
import org.elasticsearch.repositories.RepositoryMissingException;
3637
import org.elasticsearch.snapshots.SnapshotException;
3738
import org.elasticsearch.snapshots.SnapshotId;
3839
import org.elasticsearch.snapshots.SnapshotInfo;
@@ -285,7 +286,13 @@ private void snapshots(SnapshotsInProgress snapshotsInProgress,
285286
// anyway in this case
286287
l.onFailure(e);
287288
});
288-
final Repository repository = repositoriesService.repository(repositoryName);
289+
final Repository repository;
290+
try {
291+
repository = repositoriesService.repository(repositoryName);
292+
} catch (RepositoryMissingException e) {
293+
listener.onFailure(e);
294+
return;
295+
}
289296
for (int i = 0; i < workers; i++) {
290297
getOneSnapshotInfo(
291298
ignoreUnavailable,

0 commit comments

Comments
 (0)