Github user cshannon commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/1853#discussion_r166388367
--- Diff:
artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/codec/PageCountPendingImpl.java
---
@@ -43,6 +44,8 @@ public PageCountPendingImpl(long queueID, long pageID,
int inc) {
long pageID;
+ long size;
--- End diff --
The issue is backwards compatibility. These values are now being stored to
the journal and old records won't have a size. So by defaulting to a 0 value
for when an old record is it makes everything simple. Yes I could make it -1
but then I have to add checks for -1 versus just using 0 as a default and then
the logic is clean as we don't need to handle negative edge cases.
---