summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbroneill <broneill@users.noreply.github.com>2015-10-14 07:06:04 -0700
committerbroneill <broneill@users.noreply.github.com>2015-10-14 07:07:02 -0700
commit0265480e804135e33574d8dfd7d4a49b71d0953b (patch)
treec18a71af1d44efb767e724dd458a7ab1d687bab4
parent5f60f8b308bb747c01557c35695b6ad83732b22a (diff)
Handle more retryable exceptions during index build.
-rw-r--r--src/main/java/com/amazon/carbonado/repo/indexed/ManagedIndex.java8
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);