mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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
This commit is contained in:
@@ -405,27 +405,6 @@ public class TransactionalCache<K extends Serializable, V extends Object>
|
||||
" 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<V> bucket = null;
|
||||
if (sharedCache.contains(key))
|
||||
{
|
||||
V existingValue = sharedCache.get(key);
|
||||
// The value needs to be kept for later checks
|
||||
bucket = new UpdateCacheBucket<V>(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<K extends Serializable, V extends Object>
|
||||
// shared cache needs to be ignored for the rest of the transaction.
|
||||
txnData.isClearOn = true;
|
||||
}
|
||||
CacheBucket<V> bucket = null;
|
||||
if (sharedCache.contains(key))
|
||||
{
|
||||
V existingValue = sharedCache.get(key);
|
||||
|
Reference in New Issue
Block a user