mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-18 10:54:54 +00:00
* Follow up to #44165 * We should just catch all exceptions here and not return errors after the index-N update went through since a subsequent delete attempt by the user would fail with SnapshotMissingException since the snapshot now appears deleted. Also, `SnapshotException` isn't even thrown in the changed spot it seems in the first place and certainly not the only exception possible.
This commit is contained in:
parent
940aa71930
commit
4a79ccd324
@ -553,7 +553,7 @@ public abstract class BlobStoreRepository extends AbstractLifecycleComponent imp
|
|||||||
for (int shardId = 0; shardId < indexMetaData.getNumberOfShards(); shardId++) {
|
for (int shardId = 0; shardId < indexMetaData.getNumberOfShards(); shardId++) {
|
||||||
try {
|
try {
|
||||||
deleteShardSnapshot(repositoryData, indexId, new ShardId(indexMetaData.getIndex(), shardId), snapshotId);
|
deleteShardSnapshot(repositoryData, indexId, new ShardId(indexMetaData.getIndex(), shardId), snapshotId);
|
||||||
} catch (SnapshotException ex) {
|
} catch (Exception ex) {
|
||||||
final int finalShardId = shardId;
|
final int finalShardId = shardId;
|
||||||
logger.warn(() -> new ParameterizedMessage("[{}] failed to delete shard data for shard [{}][{}]",
|
logger.warn(() -> new ParameterizedMessage("[{}] failed to delete shard data for shard [{}][{}]",
|
||||||
snapshotId, indexId.getName(), finalShardId), ex);
|
snapshotId, indexId.getName(), finalShardId), ex);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user