ARTEMIS-3604 Fixing size adjustment

This commit is contained in:
franz1981 2021-12-11 08:23:33 +01:00 committed by clebertsuconic
parent af13d90c57
commit 03b61c5da0
1 changed files with 3 additions and 3 deletions

View File

@ -67,8 +67,8 @@ public class ThresholdActor<T> extends ProcessorBase<Object> {
listener.onMessage(theTask); listener.onMessage(theTask);
} finally { } finally {
if (estimateSize > 0) { if (estimateSize > 0) {
SIZE_UPDATER.getAndAdd(this, -size); SIZE_UPDATER.getAndAdd(this, -estimateSize);
} else { } else if (logger.isDebugEnabled()) {
logger.debug("element " + theTask + " returned an invalid size over the Actor during release"); 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) { if (size > maxSize) {
flush(); flush();
} }
} else { } else if (logger.isDebugEnabled()) {
logger.debug("element " + message + " returned an invalid size over the Actor"); logger.debug("element " + message + " returned an invalid size over the Actor");
} }
task(message); task(message);