Github user cshannon commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1853#discussion_r166700570
  
    --- Diff: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionImpl.java
 ---
    @@ -439,7 +453,7 @@ public void confirmPosition(final Transaction tx, final 
PagePosition position) t
        public void ackTx(final Transaction tx, final PagedReference reference) 
throws Exception {
           confirmPosition(tx, reference.getPosition());
     
    -      counter.increment(tx, -1);
    +      counter.increment(tx, -1, -getPersistentSize(reference));
    --- End diff --
    
    @michaelandrepearce  - So because of this line here we can't really default 
the persistentSize to -1, it needs to be 0.   This call here will store a new 
PageCountRecordInc() record to the journal with a negative count and negative 
size on message ack to decrement the counters. Because of this a negative can 
actually be a valid value and really 0 should mean not set (we should never 
have a message size of 0)


---

Reply via email to