ARTEMIS-3054 - fix lock inversion - intermittent failure of PageCleanupWhileReplicaCatchupTest and hang
This commit is contained in:
parent
dcb6292def
commit
56299e846a
|
@ -652,12 +652,12 @@ public class JournalStorageManager extends AbstractJournalStorageManager {
|
|||
|
||||
try {
|
||||
Map<SimpleString, Collection<Integer>> pageFilesToSync;
|
||||
storageManagerLock.writeLock().lock();
|
||||
|
||||
// We need to get this lock here in order to
|
||||
// avoid a clash with Page.cleanup();
|
||||
// This was a fix part of https://issues.apache.org/jira/browse/ARTEMIS-3054
|
||||
pagingManager.lock();
|
||||
storageManagerLock.writeLock().lock();
|
||||
try {
|
||||
if (isReplicated())
|
||||
throw new ActiveMQIllegalStateException("already replicating");
|
||||
|
|
|
@ -80,7 +80,7 @@ public class PageCleanupWhileReplicaCatchupTest extends FailoverTestBase {
|
|||
return createInVMFailoverServer(realFiles, configuration, PAGE_SIZE, PAGE_MAX, conf, nodeManager, id);
|
||||
}
|
||||
|
||||
@Test(timeout = 120_000)
|
||||
@Test(timeout = 160_000)
|
||||
public void testPageCleanup() throws Throwable {
|
||||
int numberOfWorkers = 20;
|
||||
|
||||
|
|
Loading…
Reference in New Issue