[SNAPSHOT] Trigger retry logic also if we hit a JsonException
We rely on retry logic when reading a snapshot since it's concurrently serialized. We should move to a better logic here but the refactoring of the blobstore change the semantics and this now throws Json exceptions rather than returning an unexpected Token
This commit is contained in:
parent
99f91f7616
commit
3ed32e022e
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
package org.elasticsearch.repositories.blobstore;
|
package org.elasticsearch.repositories.blobstore;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.core.JsonParseException;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.common.collect.ImmutableMap;
|
import com.google.common.collect.ImmutableMap;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
|
@ -492,6 +493,8 @@ public abstract class BlobStoreRepository extends AbstractLifecycleComponent<Rep
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw new ElasticsearchParseException("unexpected token [" + token + "]");
|
throw new ElasticsearchParseException("unexpected token [" + token + "]");
|
||||||
|
} catch (JsonParseException ex) {
|
||||||
|
throw new ElasticsearchParseException("failed to read snapshot", ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue