[
https://issues.apache.org/jira/browse/ARTEMIS-4065?focusedWorklogId=832832&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-832832
]
ASF GitHub Bot logged work on ARTEMIS-4065:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 12/Dec/22 17:50
Start Date: 12/Dec/22 17:50
Worklog Time Spent: 10m
Work Description: clebertsuconic commented on code in PR #4265:
URL: https://github.com/apache/activemq-artemis/pull/4265#discussion_r1046173412
##########
artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SizeAwareMetric.java:
##########
@@ -163,6 +173,21 @@ public final long addSize(final int delta) {
return addSize(delta, false);
}
+ public final void add(final int elements, final long size) {
+
+ long currentSize = sizeUpdater.addAndGet(this, size);
+ long currentElements = elementsUpdater.addAndGet(this, elements);
+
+ if (elements >= 0) {
+ assert size >= 0 : "If elements is positve, size must be positive";
Review Comment:
@gemmellr thanks for the catch!
Issue Time Tracking
-------------------
Worklog Id: (was: 832832)
Time Spent: 1h 20m (was: 1h 10m)
> Option to use non persistent counters in paging. Rebuild them upon start if
> persistence is disabled on them
> -----------------------------------------------------------------------------------------------------------
>
> Key: ARTEMIS-4065
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4065
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Reporter: Clebert Suconic
> Priority: Major
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> Instead of storing records on journal for counting how many records there are
> in paging, the system should instead just swipe the paging system in parallel
> with processing data.
> The changes I'm making will take a snapshot of the current records of paging,
> and then it will read all the pages to rebuild the counters.
> On tests I am making from a real data server, a system that had a lot of
> pages (700) needed less than 1 minute to rebuild the counters, and the
> messages were available to be delivered while the swipe was being done.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)