mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -709,6 +709,28 @@ public class CacheTest extends TestCase
|
|||||||
};
|
};
|
||||||
executeAndCheck(callback, COMMON_KEY, null);
|
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>
|
* <ul>
|
||||||
* <li>Add to the backing cache</li>
|
* <li>Add to the backing cache</li>
|
||||||
@@ -717,7 +739,7 @@ public class CacheTest extends TestCase
|
|||||||
* <li>Commit</li>
|
* <li>Commit</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
*/
|
*/
|
||||||
public void testConcurrentRemoveAgainstUpdate()throws Throwable
|
public void testConcurrentRemoveAgainstUpdate_PreExisting()throws Throwable
|
||||||
{
|
{
|
||||||
RetryingTransactionCallback<Object> callback = new RetryingTransactionCallback<Object>()
|
RetryingTransactionCallback<Object> callback = new RetryingTransactionCallback<Object>()
|
||||||
{
|
{
|
||||||
|
@@ -502,19 +502,11 @@ public class TransactionalCache<K extends Serializable, V extends Object>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
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
|
// Create a bucket to remove the value from the shared cache
|
||||||
txnData.removedItemsCache.add(key);
|
txnData.removedItemsCache.add(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// remove the item from the udpated cache, if present
|
// remove the item from the udpated cache, if present
|
||||||
txnData.updatedItemsCache.remove(key);
|
txnData.updatedItemsCache.remove(key);
|
||||||
// done
|
// done
|
||||||
|
Reference in New Issue
Block a user