From c7ed0857ae64d224ae477ef8f1c3b973aa86fe78 Mon Sep 17 00:00:00 2001 From: Alan Davis Date: Wed, 12 Feb 2014 14:30:50 +0000 Subject: [PATCH] Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud) 60624: Failures in post-commit writes of NewCacheBuckets and UpdateCacheBuckets are logged in more details (MNT-10486) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@62354 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../repo/cache/TransactionalCache.java | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/source/java/org/alfresco/repo/cache/TransactionalCache.java b/source/java/org/alfresco/repo/cache/TransactionalCache.java index 4c70de6863..e5d4659269 100644 --- a/source/java/org/alfresco/repo/cache/TransactionalCache.java +++ b/source/java/org/alfresco/repo/cache/TransactionalCache.java @@ -937,9 +937,26 @@ public class TransactionalCache { Serializable key = entry.getKey(); CacheBucket bucket = entry.getValue(); - bucket.doPostCommit( - sharedCache, - key, this.isMutable, this.allowEqualsChecks, txnData.isReadOnly); + try + { + bucket.doPostCommit( + sharedCache, + key, this.isMutable, this.allowEqualsChecks, txnData.isReadOnly); + } + catch (Exception e) + { + // MNT-10486: NPE in NodeEntity during post-commit write through to shared cache + // This try-catch is diagnostic in nature. We need to know the names of the caches + // and details of the values involved. + // The causal exception will be rethrown. + throw new AlfrescoRuntimeException( + "CacheBucket postCommit transfer to shared cache failed: \n" + + " Cache: " + sharedCache + "\n" + + " Key: " + key + "\n" + + " New Value: " + bucket.getValue() + "\n" + + " Cash Value: " + sharedCache.get(key), + e); + } } if (isDebugEnabled) {