summaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorBrian S. O'Neill <bronee@gmail.com>2013-03-14 15:48:42 +0000
committerBrian S. O'Neill <bronee@gmail.com>2013-03-14 15:48:42 +0000
commitf54bb9107d4f1a4285c67205c6973de437923be9 (patch)
tree8317d33aad445f1f15645fa767a306dad4ed0f9d /src/main/java
parentf9d2dbbc2f5640708a1f07469cd99874734daef1 (diff)
Some repositories don't properly support top-level transactions, so retry if the isolation level switches incompatibly.
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/amazon/carbonado/repo/indexed/IndexAnalysis.java16
1 files changed, 3 insertions, 13 deletions
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<S extends Storable> {
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) {