Github user michaelandrepearce commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/1853#discussion_r166178175
--- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionCounterImpl.java
---
@@ -374,8 +403,43 @@ private ItemOper(PageSubscriptionCounterImpl counter, long id, int
add) {
@Override
public void afterCommit(Transaction tx) {
for (ItemOper oper : operations) {
- oper.counter.incrementProcessed(oper.id, oper.amount);
+ oper.counter.incrementProcessed(oper.id, oper.amount, oper.size);
}
}
}
+
+ private static class PendingCounter {
+ final long id;
+ final AtomicInteger count;
--- End diff --
could this be an int, with a static atomic updater (ditto with the atomic below also)
---
|