gemmellr commented on code in PR #4183:
URL: https://github.com/apache/activemq-artemis/pull/4183#discussion_r995936037


##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java:
##########
@@ -704,9 +708,9 @@ public List<MessageReference> cancelRefs(final boolean 
failed,
          final List<MessageReference> refs = new 
ArrayList<>(deliveringRefs.size());
          MessageReference ref;
          while ((ref = deliveringRefs.poll()) != null) {
+            metrics.addAcknowledge(ref.getMessage().getEncodeSize());

Review Comment:
   Not sure, just seems like it would be unsafe currently as there are 2 
different synchronisations at work, but neither seems to cover all the usages 
of this. If going to atomic updates, might be a candidate for using a 
FieldUpdater rather than AtomicInteger



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to