diff --git a/config/alfresco/attributes-service-context.xml b/config/alfresco/attributes-service-context.xml
index 8f59d61e67..038ca1e8e8 100644
--- a/config/alfresco/attributes-service-context.xml
+++ b/config/alfresco/attributes-service-context.xml
@@ -22,9 +22,15 @@
-
+
100
+
+ 100
+
+
+ 0
+
diff --git a/config/alfresco/avm-services-context.xml b/config/alfresco/avm-services-context.xml
index 92412f7ced..59bfa38bc8 100644
--- a/config/alfresco/avm-services-context.xml
+++ b/config/alfresco/avm-services-context.xml
@@ -274,5 +274,33 @@
workspace://SpacesStore
-
+
+
+
+
+
+
+
+
+ 500
+
+
+ 250
+
+
+
+
+
+
+
+
+ 100
+
+
+ 100
+
+
+ 0
+
+
diff --git a/config/alfresco/cache-context.xml b/config/alfresco/cache-context.xml
index 2f818357dd..45aa022e1e 100644
--- a/config/alfresco/cache-context.xml
+++ b/config/alfresco/cache-context.xml
@@ -59,7 +59,7 @@
org.alfresco.cache.qnameEntityTransactionalCache
- 100
+ 500
@@ -275,7 +275,7 @@
org.alfresco.storeAndNodeIdTransactionalCache
- 500
+ 10000
@@ -311,7 +311,7 @@
org.alfresco.parentAssocsTransactionalCache
- 1000
+ 10000
diff --git a/config/alfresco/ehcache-default.xml b/config/alfresco/ehcache-default.xml
index 57b4a3872f..efbe1ca35c 100644
--- a/config/alfresco/ehcache-default.xml
+++ b/config/alfresco/ehcache-default.xml
@@ -277,13 +277,13 @@
/>
diff --git a/config/alfresco/extension/ehcache-custom.xml.sample.cluster b/config/alfresco/extension/ehcache-custom.xml.sample.cluster
index 908e2272c3..e8e3d75ed2 100644
--- a/config/alfresco/extension/ehcache-custom.xml.sample.cluster
+++ b/config/alfresco/extension/ehcache-custom.xml.sample.cluster
@@ -537,7 +537,7 @@
@@ -642,7 +642,7 @@
diff --git a/config/alfresco/hibernate-context.xml b/config/alfresco/hibernate-context.xml
index 1b01a5329e..3e0589f87c 100644
--- a/config/alfresco/hibernate-context.xml
+++ b/config/alfresco/hibernate-context.xml
@@ -410,6 +410,34 @@
+
+
+
+
+
+
+
+ 10000
+
+
+ 5000
+
+
+
+
+
+
+
+ 2000
+
+
+ 50000
+
+
+ 3
+
+
+
@@ -424,6 +452,7 @@
+ sessionSizeResourceInterceptor
daoServiceDirtySessionInterceptor
dbNodeDaoServiceTxnRegistration
diff --git a/config/alfresco/node-services-context.xml b/config/alfresco/node-services-context.xml
index 68820d729a..86cf177465 100644
--- a/config/alfresco/node-services-context.xml
+++ b/config/alfresco/node-services-context.xml
@@ -190,7 +190,7 @@
-
+
@@ -210,21 +210,8 @@
-
-
-
- org.alfresco.service.cmr.repository.NodeService
-
-
-
-
-
-
- sessionSizeResourceInterceptor
-
-
-
-
+
+
@@ -250,26 +237,5 @@
${system.cascadeDeleteInTransaction}
-
-
-
-
-
-
-
- 10000
-
-
- 5000
-
-
-
-
-
-
-
- 5000
-
-
diff --git a/source/java/org/alfresco/repo/cache/TransactionalCache.java b/source/java/org/alfresco/repo/cache/TransactionalCache.java
index 544a8f640f..a996c113c0 100644
--- a/source/java/org/alfresco/repo/cache/TransactionalCache.java
+++ b/source/java/org/alfresco/repo/cache/TransactionalCache.java
@@ -405,6 +405,27 @@ 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
@@ -416,7 +437,6 @@ 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);
@@ -484,7 +504,15 @@ public class TransactionalCache
// is the shared cache going to be cleared?
if (txnData.isClearOn)
{
- // don't store removals if we're just going to clear it all out later
+ // 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;
+ }
}
else
{
@@ -806,6 +834,7 @@ public class TransactionalCache
{
private Cache updatedItemsCache;
private Cache removedItemsCache;
+ private boolean haveIssuedFullWarning;
private boolean isClearOn;
private boolean isClosed;
}
diff --git a/source/java/org/alfresco/repo/domain/hibernate/Node.hbm.xml b/source/java/org/alfresco/repo/domain/hibernate/Node.hbm.xml
index 90796facd1..064acdd3d9 100644
--- a/source/java/org/alfresco/repo/domain/hibernate/Node.hbm.xml
+++ b/source/java/org/alfresco/repo/domain/hibernate/Node.hbm.xml
@@ -58,9 +58,9 @@
class="org.alfresco.repo.domain.hibernate.StoreImpl"
column="store_id"
not-null="true"
- lazy="false"
foreign-key="fk_alf_node_store"
- fetch="join" />
+ lazy="proxy"
+ fetch="select" />
@@ -97,9 +97,8 @@