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 2021/12/11 14:47:21 UTC
[activemq-artemis] branch main updated: ARTEMIS-3604 Fixing size adjustment
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 03b61c5 ARTEMIS-3604 Fixing size adjustment
03b61c5 is described below
commit 03b61c5da0084fe021502704c00cd16f384c9886
Author: franz1981 <ni...@gmail.com>
AuthorDate: Sat Dec 11 08:23:33 2021 +0100
ARTEMIS-3604 Fixing size adjustment
---
.../org/apache/activemq/artemis/utils/actors/ThresholdActor.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/ThresholdActor.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/ThresholdActor.java
index c7e51d7..6b00b87 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/ThresholdActor.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/ThresholdActor.java
@@ -67,8 +67,8 @@ public class ThresholdActor<T> extends ProcessorBase<Object> {
listener.onMessage(theTask);
} finally {
if (estimateSize > 0) {
- SIZE_UPDATER.getAndAdd(this, -size);
- } else {
+ SIZE_UPDATER.getAndAdd(this, -estimateSize);
+ } else if (logger.isDebugEnabled()) {
logger.debug("element " + theTask + " returned an invalid size over the Actor during release");
}
}
@@ -81,7 +81,7 @@ public class ThresholdActor<T> extends ProcessorBase<Object> {
if (size > maxSize) {
flush();
}
- } else {
+ } else if (logger.isDebugEnabled()) {
logger.debug("element " + message + " returned an invalid size over the Actor");
}
task(message);