diff options
author | broneill <broneill@users.noreply.github.com> | 2015-10-14 07:06:04 -0700 |
---|---|---|
committer | broneill <broneill@users.noreply.github.com> | 2015-10-14 07:06:04 -0700 |
commit | f793f4e762ebed02d74938402d704a4fa845cac3 (patch) | |
tree | da97995537a8a70ddf629c71d2460e3935a6ec85 /src/main/java/com | |
parent | 291ac5d88b79cae83ab812ff866f4364e62ef49f (diff) |
Handle more retryable exceptions during index build.
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/amazon/carbonado/repo/indexed/ManagedIndex.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/com/amazon/carbonado/repo/indexed/ManagedIndex.java b/src/main/java/com/amazon/carbonado/repo/indexed/ManagedIndex.java index f7717b3..aa4cc63 100644 --- a/src/main/java/com/amazon/carbonado/repo/indexed/ManagedIndex.java +++ b/src/main/java/com/amazon/carbonado/repo/indexed/ManagedIndex.java @@ -30,11 +30,13 @@ import org.apache.commons.logging.LogFactory; import com.amazon.carbonado.CorruptEncodingException;
import com.amazon.carbonado.Cursor;
+import com.amazon.carbonado.FetchDeadlockException;
import com.amazon.carbonado.FetchException;
import com.amazon.carbonado.FetchTimeoutException;
import com.amazon.carbonado.IsolationLevel;
-import com.amazon.carbonado.PersistTimeoutException;
+import com.amazon.carbonado.PersistDeadlockException;
import com.amazon.carbonado.PersistException;
+import com.amazon.carbonado.PersistTimeoutException;
import com.amazon.carbonado.Query;
import com.amazon.carbonado.Repository;
import com.amazon.carbonado.RepositoryException;
@@ -584,7 +586,9 @@ class ManagedIndex<S extends Storable> implements IndexEntryAccessor<S> { retry = false;
} catch (RepositoryException e) {
if (e instanceof FetchTimeoutException ||
- e instanceof PersistTimeoutException)
+ e instanceof FetchDeadlockException ||
+ e instanceof PersistTimeoutException ||
+ e instanceof PersistDeadlockException)
{
log.warn("Lock conflict during index repair; will retry: " +
indexEntry + ", " + e);
|