You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2022/10/18 17:49:42 UTC
[activemq-artemis] 01/02: ARTEMIS-4056 Expanding nextPage check into isDeleted
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 77ad2b0bc0aff353b6d535aee1351ae49c7bb501
Author: Clebert Suconic <cl...@apache.org>
AuthorDate: Tue Oct 18 11:51:47 2022 -0400
ARTEMIS-4056 Expanding nextPage check into isDeleted
---
.../activemq/artemis/core/paging/cursor/impl/PageSubscriptionImpl.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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 3be9037fb9..cdbd1dba72 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
@@ -1508,7 +1508,8 @@ public final class PageSubscriptionImpl implements PageSubscription {
while (page <= pageStore.getCurrentWritingPage()) {
PageCursorInfo info = locatePageInfo(page);
- if (info == null || info.getCompleteInfo() == null) {
+ // if pendingDelete or complete, we just move to next page
+ if (info == null || info.getCompleteInfo() == null && !info.isPendingDelete()) {
return page;
}
if (logger.isDebugEnabled()) {