If we fail to read the global metadata in a snapshot we would throw `SnapshotMissingException` but wouldn't do so for the index metadata. This is breaking SLM tests at a low rate because they use `SnapshotMissingException` thrown from snapshot status APIs to wait for a snapshot being gone. Also, we should be consistent here in general and not leak the `NoSuchFileException` to the transport layer for index meta. Closes #46508
This commit is contained in:
parent
7549be4489
commit
bac119f672
|
@ -786,7 +786,11 @@ public abstract class BlobStoreRepository extends AbstractLifecycleComponent imp
|
|||
|
||||
@Override
|
||||
public IndexMetaData getSnapshotIndexMetaData(final SnapshotId snapshotId, final IndexId index) throws IOException {
|
||||
return indexMetaDataFormat.read(indexContainer(index), snapshotId.getUUID());
|
||||
try {
|
||||
return indexMetaDataFormat.read(indexContainer(index), snapshotId.getUUID());
|
||||
} catch (NoSuchFileException e) {
|
||||
throw new SnapshotMissingException(metadata.name(), snapshotId, e);
|
||||
}
|
||||
}
|
||||
|
||||
private BlobPath indicesPath() {
|
||||
|
|
Loading…
Reference in New Issue