From f54bb9107d4f1a4285c67205c6973de437923be9 Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Thu, 14 Mar 2013 15:48:42 +0000 Subject: Some repositories don't properly support top-level transactions, so retry if the isolation level switches incompatibly. --- .../com/amazon/carbonado/repo/indexed/IndexAnalysis.java | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'src/main/java/com/amazon/carbonado/repo/indexed') diff --git a/src/main/java/com/amazon/carbonado/repo/indexed/IndexAnalysis.java b/src/main/java/com/amazon/carbonado/repo/indexed/IndexAnalysis.java index b5484c3..e44964b 100644 --- a/src/main/java/com/amazon/carbonado/repo/indexed/IndexAnalysis.java +++ b/src/main/java/com/amazon/carbonado/repo/indexed/IndexAnalysis.java @@ -140,19 +140,9 @@ class IndexAnalysis { txn.exit(); } } catch (FetchException e) { - if (e instanceof FetchDeadlockException || e instanceof FetchTimeoutException) { - // Might be caused by coarse locks. Switch to nested - // transaction to share the locks. - Transaction txn = repository.getWrappedRepository() - .enterTransaction(IsolationLevel.READ_COMMITTED); - try { - storedInfos = query.fetch().toList(); - } finally { - txn.exit(); - } - } else { - throw e; - } + // Might be caused by coarse locks or isolation level + // swtching. Avoid the explicit isolation level. + storedInfos = query.fetch().toList(); } for (StoredIndexInfo indexInfo : storedInfos) { -- cgit v1.2.3