mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Added pessimistic locking in several places to shut down deadlocks.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3252 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -51,6 +51,7 @@ class AVMTester implements Runnable
|
||||
private List<String> fAllFiles;
|
||||
|
||||
private static boolean fgFrozen = false;
|
||||
private static int fgOpCount = 0;
|
||||
|
||||
/**
|
||||
* The operation table.
|
||||
@@ -239,6 +240,7 @@ class AVMTester implements Runnable
|
||||
snapshot();
|
||||
break;
|
||||
}
|
||||
IncCount();
|
||||
}
|
||||
System.out.println(fAllPaths.size() + " fses in " + (System.currentTimeMillis() - startTime) +
|
||||
"ms");
|
||||
@@ -615,4 +617,14 @@ class AVMTester implements Runnable
|
||||
{
|
||||
return fAllPaths.get(fgRandom.nextInt(fAllPaths.size()));
|
||||
}
|
||||
|
||||
private static synchronized void IncCount()
|
||||
{
|
||||
++fgOpCount;
|
||||
}
|
||||
|
||||
public static synchronized int GetCount()
|
||||
{
|
||||
return fgOpCount;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user