Fix for ALF-19787 RED BUILD: Build repeatedly hanging in UsageTestSuite

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@54799 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrew Hind
2013-09-02 19:40:53 +00:00
parent 8fa8216fef
commit 9d0fd59c48

View File

@@ -1603,13 +1603,12 @@ public class IndexInfo implements IndexMonitor
while (shouldBlock()) while (shouldBlock())
{ {
synchronized (mergerTargetLock) synchronized (mergerTargetLock)
{
if(shouldBlock())
{ {
if (s_logger.isDebugEnabled()) if (s_logger.isDebugEnabled())
{ {
s_logger.debug("THROTTLING: " + Thread.currentThread().getName() + " " + indexEntries.size()); s_logger.debug("THROTTLING: " + Thread.currentThread().getName() + " " + indexEntries.size());
} }
merger.schedule();
releaseWriteLock(); releaseWriteLock();
try try
{ {
@@ -1619,7 +1618,6 @@ public class IndexInfo implements IndexMonitor
{ {
} }
} }
}
getWriteLock(); getWriteLock();
} }
thisThreadPreparing.set(this); thisThreadPreparing.set(this);
@@ -2575,14 +2573,11 @@ public class IndexInfo implements IndexMonitor
if (!shouldBlock()) if (!shouldBlock())
{ {
synchronized (mergerTargetLock) synchronized (mergerTargetLock)
{
if (!shouldBlock())
{ {
mergerTargetLock.notifyAll(); mergerTargetLock.notifyAll();
} }
} }
} }
}
private void writeStatusToFile(FileChannel channel) throws IOException private void writeStatusToFile(FileChannel channel) throws IOException
{ {