Merged BRANCHES/DEV/V3.3-BUG-FIX to HEAD:

22351: Merged BRANCHES/V3.3 to BRANCHES/DEV/V3.3-BUG-FIX:
        22350: Fixed ALF-3937: Permissions are not updated when a group is updated in a cluster


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22352 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2010-09-08 22:54:54 +00:00
parent 85dee9cd2d
commit a4095f1d7c
2 changed files with 25 additions and 11 deletions

View File

@@ -709,6 +709,28 @@ public class CacheTest extends TestCase
};
executeAndCheck(callback, COMMON_KEY, null);
}
/**
* <ul>
* <li>Remove from the backing cache</li>
* <li>Remove from the transactional cache</li>
* <li>Add to the backing cache</li>
* <li>Commit</li>
* </ul>
*/
public void testConcurrentRemoveAgainstUpdate_NoPreExisting()throws Throwable
{
RetryingTransactionCallback<Object> callback = new RetryingTransactionCallback<Object>()
{
public Object execute() throws Throwable
{
backingCache.remove(COMMON_KEY);
transactionalCache.remove(COMMON_KEY);
backingCache.put(COMMON_KEY, "aaa2");
return null;
}
};
executeAndCheck(callback, COMMON_KEY, null);
}
/**
* <ul>
* <li>Add to the backing cache</li>
@@ -717,7 +739,7 @@ public class CacheTest extends TestCase
* <li>Commit</li>
* </ul>
*/
public void testConcurrentRemoveAgainstUpdate()throws Throwable
public void testConcurrentRemoveAgainstUpdate_PreExisting()throws Throwable
{
RetryingTransactionCallback<Object> callback = new RetryingTransactionCallback<Object>()
{

View File

@@ -503,16 +503,8 @@ public class TransactionalCache<K extends Serializable, V extends Object>
}
else
{
V existingValue = getSharedCacheValue(key);
if (existingValue == null)
{
// There is no point doing a remove for a value that doesn't exist
}
else
{
// Create a bucket to remove the value from the shared cache
txnData.removedItemsCache.add(key);
}
// Create a bucket to remove the value from the shared cache
txnData.removedItemsCache.add(key);
}
}
// remove the item from the udpated cache, if present