瀏覽代碼

Change snapshot status error to use generic SnapshotException (#24355)

Changes the snapshot status read exception from the (misleading)
IndexShardRestoreFailedException to the generic SnapshotException

Closes #24225
Ali Beyad 8 年之前
父節點
當前提交
2facc42a55
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      core/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java

+ 1 - 1
core/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java

@@ -954,7 +954,7 @@ public abstract class BlobStoreRepository extends AbstractLifecycleComponent imp
             try {
             try {
                 return indexShardSnapshotFormat(version).read(blobContainer, snapshotId.getUUID());
                 return indexShardSnapshotFormat(version).read(blobContainer, snapshotId.getUUID());
             } catch (IOException ex) {
             } catch (IOException ex) {
-                throw new IndexShardRestoreFailedException(shardId, "failed to read shard snapshot file", ex);
+                throw new SnapshotException(metadata.name(), snapshotId, "failed to read shard snapshot file for " + shardId, ex);
             }
             }
         }
         }