[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:
Simon Willnauer 2014-09-16 14:15:00 +02:00
parent 99f91f7616
commit 3ed32e022e
1 changed files with 3 additions and 0 deletions

View File

@ -19,6 +19,7 @@
package org.elasticsearch.repositories.blobstore;
import com.fasterxml.jackson.core.JsonParseException;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
@ -492,6 +493,8 @@ public abstract class BlobStoreRepository extends AbstractLifecycleComponent<Rep
}
}
throw new ElasticsearchParseException("unexpected token [" + token + "]");
} catch (JsonParseException ex) {
throw new ElasticsearchParseException("failed to read snapshot", ex);
}
}