From 69f987c456aabefa7369fed07fb8152d25287b93 Mon Sep 17 00:00:00 2001 From: Derek Hulley Date: Tue, 13 Oct 2009 11:20:19 +0000 Subject: [PATCH] Merged V3.2 to HEAD 15341: Update svn:mergeinfo 15220: NestedSQLException containing causal exceptions with word "deadlock" will trigger a retry Added "constraint" search as part of the merge 15565: Update svn:mergeinfo 15569: Merge 3.1 to 3.2: 15231: Fix for cut/paste file between folders on CIFS. ETHREEOH-2323, + ENH-515. (Record only) ___________________________________________________________________ Modified: svn:mergeinfo Merged /alfresco/BRANCHES/V3.1:r14561-14562,14922,15155,15233-15234,15258,15326 Merged /alfresco/BRANCHES/V3.2:r15231,15341,15520,15565,15569 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16857 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../repo/transaction/RetryingTransactionHelper.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/java/org/alfresco/repo/transaction/RetryingTransactionHelper.java b/source/java/org/alfresco/repo/transaction/RetryingTransactionHelper.java index ec288d66e0..af9ac01c2f 100644 --- a/source/java/org/alfresco/repo/transaction/RetryingTransactionHelper.java +++ b/source/java/org/alfresco/repo/transaction/RetryingTransactionHelper.java @@ -101,6 +101,7 @@ public class RetryingTransactionHelper ConstraintViolationException.class, UncategorizedSQLException.class, SQLException.class, + NestedSQLException.class, BatchUpdateException.class, DataIntegrityViolationException.class, StaleStateException.class, @@ -479,6 +480,17 @@ public class RetryingTransactionHelper { // We dig further into this cause = retryCause.getCause(); + // Check for SQL-related "deadlock" messages + if (retryCause.getMessage().toLowerCase().contains("deadlock")) + { + // The word "deadlock" is usually an indication that we need to resolve with a retry. + return retryCause; + } + else if (retryCause.getMessage().toLowerCase().contains("constraint")) + { + // The word "constraint" is also usually an indication or a concurrent update + return retryCause; + } // Recurse return extractRetryCause(cause); }