mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
ACS-1264: Content Model changes dynamically updated to node caches across a cluster deadlock (#289)
Re enabling changes disabled in ACS-936 we can see deadlock in asynchronouslyRefreshedCacheThreadPool (AbstractAsynchronouslyRefreshedCache). There should be no reason to be calling the dictionary destroy method before the doCall() finishes...and it is the use of the destroy method that carries the risk of deadlock. Proposed fix: the liveLock is used for the doCall() method, this will stop deadlock from external calls to dictionary destroy() while doCall is in progress. Removed invalidating cache fix (e.g. fix the issue where cluster nodes could have null values and other nodes had default value… so no properly invalidated on node startup). This fix was moved in ClusteringBootstrap as the initial one was causing issues.
This commit is contained in:
@@ -424,6 +424,7 @@ public abstract class AbstractAsynchronouslyRefreshedCache<T>
|
||||
@Override
|
||||
public Void call()
|
||||
{
|
||||
liveLock.writeLock().lock();
|
||||
try
|
||||
{
|
||||
doCall();
|
||||
@@ -444,6 +445,10 @@ public abstract class AbstractAsynchronouslyRefreshedCache<T>
|
||||
}
|
||||
return null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
liveLock.writeLock().unlock();
|
||||
}
|
||||
}
|
||||
|
||||
private void doCall() throws Exception
|
||||
|
Reference in New Issue
Block a user