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 2023/03/07 22:19:35 UTC

[activemq-artemis] branch main updated: ARTEMIS-4199 PageCounter could leave a record pending in the journal

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


The following commit(s) were added to refs/heads/main by this push:
     new dc93f01542 ARTEMIS-4199 PageCounter could leave a record pending in the journal
dc93f01542 is described below

commit dc93f01542c596399bd94289494f99d2511656cc
Author: Clebert Suconic <cl...@apache.org>
AuthorDate: Tue Mar 7 17:18:42 2023 -0500

    ARTEMIS-4199 PageCounter could leave a record pending in the journal
    
    This is just an annoying thing. as the functionality would work properly if there was a previous value.
    No other harm other than the cannot find TX record on startup for this, hence I'm fixing it.
---
 .../artemis/core/paging/cursor/impl/PageSubscriptionCounterImpl.java     | 1 +
 1 file changed, 1 insertion(+)

diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionCounterImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionCounterImpl.java
index 41d0255a21..df69f0e96c 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionCounterImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionCounterImpl.java
@@ -252,6 +252,7 @@ public class PageSubscriptionCounterImpl extends BasePagingCounter {
             }
 
             if (keepZero) {
+               tx.setContainsPersistent();
                recordID = storage.storePageCounter(tx.getID(), subscriptionID, 0L, 0L);
             } else {
                recordID = -1;