This is an automated email from the ASF dual-hosted git repository. clebertsuconic pushed a commit to branch 2.19.x in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
commit fdbd2fa34a3d368671117eb589bf0f72b7508532 Author: gtully <[email protected]> AuthorDate: Wed Dec 8 12:15:16 2021 +0000 ARTEMIS-3054 - fix lock inversion - intermittent failure of PageCleanupWhileReplicaCatchupTest and hang (cherry picked from commit 56299e846afb223752a7595581433745ae342156) --- .../artemis/core/persistence/impl/journal/JournalStorageManager.java | 2 +- .../cluster/failover/PageCleanupWhileReplicaCatchupTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JournalStorageManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JournalStorageManager.java index f4e4a2a..82321a7 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JournalStorageManager.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JournalStorageManager.java @@ -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"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/PageCleanupWhileReplicaCatchupTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/PageCleanupWhileReplicaCatchupTest.java index 1e977d6..c5a99b5 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/PageCleanupWhileReplicaCatchupTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/PageCleanupWhileReplicaCatchupTest.java @@ -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;
