ARTEMIS-3054 - fix lock inversion - intermittent failure of PageCleanupWhileReplicaCatchupTest and hang

This commit is contained in:
gtully 2021-12-08 12:15:16 +00:00 committed by Gary Tully
parent dcb6292def
commit 56299e846a
2 changed files with 2 additions and 2 deletions

View File

@ -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");

View File

@ -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;