|
@@ -109,6 +109,7 @@ import org.elasticsearch.repositories.RepositoryOperation;
|
|
|
import org.elasticsearch.repositories.RepositoryStats;
|
|
|
import org.elasticsearch.repositories.RepositoryVerificationException;
|
|
|
import org.elasticsearch.repositories.ShardGenerations;
|
|
|
+import org.elasticsearch.snapshots.AbortedSnapshotException;
|
|
|
import org.elasticsearch.snapshots.SnapshotException;
|
|
|
import org.elasticsearch.snapshots.SnapshotId;
|
|
|
import org.elasticsearch.snapshots.SnapshotInfo;
|
|
@@ -1755,7 +1756,7 @@ public abstract class BlobStoreRepository extends AbstractLifecycleComponent imp
|
|
|
for (String fileName : fileNames) {
|
|
|
if (snapshotStatus.isAborted()) {
|
|
|
logger.debug("[{}] [{}] Aborted on the file [{}], exiting", shardId, snapshotId, fileName);
|
|
|
- throw new IndexShardSnapshotFailedException(shardId, "Aborted");
|
|
|
+ throw new AbortedSnapshotException();
|
|
|
}
|
|
|
|
|
|
logger.trace("[{}] [{}] Processing [{}]", shardId, snapshotId, fileName);
|
|
@@ -1899,7 +1900,7 @@ public abstract class BlobStoreRepository extends AbstractLifecycleComponent imp
|
|
|
private static Releasable incrementStoreRef(Store store, IndexShardSnapshotStatus snapshotStatus, ShardId shardId) {
|
|
|
if (store.tryIncRef() == false) {
|
|
|
if (snapshotStatus.isAborted()) {
|
|
|
- throw new IndexShardSnapshotFailedException(shardId, "Aborted");
|
|
|
+ throw new AbortedSnapshotException();
|
|
|
} else {
|
|
|
assert false : "Store should not be closed concurrently unless snapshot is aborted";
|
|
|
throw new IndexShardSnapshotFailedException(shardId, "Store got closed concurrently");
|
|
@@ -2233,7 +2234,7 @@ public abstract class BlobStoreRepository extends AbstractLifecycleComponent imp
|
|
|
if (snapshotStatus.isAborted()) {
|
|
|
logger.debug("[{}] [{}] Aborted on the file [{}], exiting", shardId,
|
|
|
snapshotId, fileInfo.physicalName());
|
|
|
- throw new IndexShardSnapshotFailedException(shardId, "Aborted");
|
|
|
+ throw new AbortedSnapshotException();
|
|
|
}
|
|
|
}
|
|
|
};
|