From 6510076be2871fcf736f9b2bd04cf27c7e8ac6ea Mon Sep 17 00:00:00 2001 From: Derek Hulley Date: Mon, 19 Oct 2009 19:16:28 +0000 Subject: [PATCH] Fixed if/else nesting broken by merge ref 17018 (Thanks, Jan) - Transactional caches were not writing updates to shared caches - Was picked up by clean bootstrap and CacheTest as well git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@17031 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../repo/cache/TransactionalCache.java | 22 +------------------ 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/source/java/org/alfresco/repo/cache/TransactionalCache.java b/source/java/org/alfresco/repo/cache/TransactionalCache.java index a996c113c0..ceec9a56ba 100644 --- a/source/java/org/alfresco/repo/cache/TransactionalCache.java +++ b/source/java/org/alfresco/repo/cache/TransactionalCache.java @@ -405,27 +405,6 @@ public class TransactionalCache " value: " + value); } } - // we have a transaction - add the item into the updated cache for this transaction - // are we in an overflow condition? - if (txnData.updatedItemsCache.getMemoryStoreSize() >= maxCacheSize) - { - // overflow about to occur or has occured - we can only guarantee non-stale - // 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)) - { - V existingValue = sharedCache.get(key); - // The value needs to be kept for later checks - bucket = new UpdateCacheBucket(existingValue, value); - } else { // we have an active transaction - add the item into the updated cache for this transaction @@ -437,6 +416,7 @@ public class TransactionalCache // shared cache needs to be ignored for the rest of the transaction. txnData.isClearOn = true; } + CacheBucket bucket = null; if (sharedCache.contains(key)) { V existingValue = sharedCache.get(key);