This is an automated email from the ASF dual-hosted git repository. clebertsuconic pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
commit f206fa1deb8470b036e90de4e91cf51e6b34f9f8 Author: Clebert Suconic <[email protected]> AuthorDate: Mon Apr 7 12:04:28 2025 -0400 ARTEMIS-5385 Optimize checkDone on Paging --- .../artemis/core/paging/cursor/impl/PageSubscriptionImpl.java | 10 ++++++---- .../tests/soak/replicationflow/ReplicationFlowControlTest.java | 2 -- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionImpl.java index c674b6a26f..745a7da608 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionImpl.java @@ -1079,15 +1079,17 @@ public final class PageSubscriptionImpl implements PageSubscription { } protected void checkDone() { - if (isDone()) { - onPageDone(this); - } + pageStore.execute(() -> { + if (isDone()) { + onPageDone(this); + } + }); } private int getNumberOfMessages() { if (numberOfMessages < 0) { try { - Page page = pageStore.usePage(pageId, false); + Page page = pageStore.usePage(pageId, true, false); if (page == null) { page = pageStore.newPageObject(pageId); diff --git a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/replicationflow/ReplicationFlowControlTest.java b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/replicationflow/ReplicationFlowControlTest.java index 4def778305..624291cd2e 100644 --- a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/replicationflow/ReplicationFlowControlTest.java +++ b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/replicationflow/ReplicationFlowControlTest.java @@ -97,8 +97,6 @@ public class ReplicationFlowControlTest extends SoakTestBase { @Override public void after() throws Exception { super.after(); - cleanupData(SERVER_NAME_0); - cleanupData(SERVER_NAME_1); } @Test --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information, visit: https://activemq.apache.org/contact
