Can't reproduce the bug but spotted a race condition in UserUsageTrackingComponent that may cause this in rare circumstances. Deal with this by throwing a ConcurrencyFailureException and let the txn retry handler retry the operation.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19862 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Steven Glover
2010-04-15 12:38:19 +00:00
parent 47905d3314
commit f14db280f3
7 changed files with 73 additions and 15 deletions

View File

@@ -43,6 +43,14 @@ public interface UsageDeltaDAO
*/
public long getTotalDeltaSize(NodeRef usageNodeRef);
/**
* Get the total delta size for a node and remove any deltas used in the calculation.
*
* @param nodeRef the node reference
* @return sum of delta sizes (in bytes) - can be +ve or -ve
*/
public long getAndRemoveTotalDeltaSize(NodeRef usageNodeRef);
public Set<NodeRef> getUsageDeltaNodes();
public int deleteDeltas(NodeRef nodeRef);