From 050dd9de3fe8f01a79f5692e2867ded3a466e373 Mon Sep 17 00:00:00 2001 From: Derek Hulley Date: Wed, 21 Oct 2009 09:22:51 +0000 Subject: [PATCH] Fixed up full-cache warnings git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@17061 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../org/alfresco/repo/cache/TransactionalCache.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/source/java/org/alfresco/repo/cache/TransactionalCache.java b/source/java/org/alfresco/repo/cache/TransactionalCache.java index 0f8053352c..e94152e53c 100644 --- a/source/java/org/alfresco/repo/cache/TransactionalCache.java +++ b/source/java/org/alfresco/repo/cache/TransactionalCache.java @@ -441,6 +441,11 @@ public class TransactionalCache // data by clearing the shared cache after the transaction. Also, the // shared cache needs to be ignored for the rest of the transaction. txnData.isClearOn = true; + if (!txnData.haveIssuedFullWarning && logger.isWarnEnabled()) + { + logger.warn("Transactional update cache '" + name + "' is full (" + maxCacheSize + ")."); + txnData.haveIssuedFullWarning = true; + } } CacheBucket bucket = null; if (sharedCache.contains(key)) @@ -532,11 +537,10 @@ public class TransactionalCache // data by clearing the shared cache after the transaction. Also, the // shared cache needs to be ignored for the rest of the transaction. txnData.isClearOn = true; - if (isDebugEnabled) + if (!txnData.haveIssuedFullWarning && logger.isWarnEnabled()) { - logger.debug("In transaction - removal cache reach capacity reached: \n" + - " cache: " + this + "\n" + - " txn: " + AlfrescoTransactionSupport.getTransactionId()); + logger.warn("Transactional removal cache '" + name + "' is full (" + maxCacheSize + ")."); + txnData.haveIssuedFullWarning = true; } } else