From f793f4e762ebed02d74938402d704a4fa845cac3 Mon Sep 17 00:00:00 2001 From: broneill Date: Wed, 14 Oct 2015 07:06:04 -0700 Subject: Handle more retryable exceptions during index build. --- src/main/java/com/amazon/carbonado/repo/indexed/ManagedIndex.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/main/java/com') 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 implements IndexEntryAccessor { 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); -- cgit v1.2.3