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 d970f8aca4..a767c09d01 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 @@ -334,7 +334,9 @@ final class PageSubscriptionImpl implements PageSubscription { } infoPG.acks.clear(); + infoPG.acks = Collections.synchronizedSet(new LinkedHashSet()); infoPG.removedReferences.clear(); + infoPG.removedReferences = new ConcurrentHashSet<>(); } tx.addOperation(new TransactionOperationAbstract() { @@ -901,11 +903,11 @@ final class PageSubscriptionImpl implements PageSubscription { private final long pageId; // Confirmed ACKs on this page - private final Set acks = Collections.synchronizedSet(new LinkedHashSet()); + private Set acks = Collections.synchronizedSet(new LinkedHashSet()); private WeakReference cache; - private final Set removedReferences = new ConcurrentHashSet<>(); + private Set removedReferences = new ConcurrentHashSet<>(); // The page was live at the time of the creation private final boolean wasLive;