[ 
https://issues.apache.org/jira/browse/ARTEMIS-2859?focusedWorklogId=500795&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-500795
 ]

ASF GitHub Bot logged work on ARTEMIS-2859:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 14/Oct/20 18:39
            Start Date: 14/Oct/20 18:39
    Worklog Time Spent: 10m 
      Work Description: clebertsuconic commented on a change in pull request 
#3282:
URL: https://github.com/apache/activemq-artemis/pull/3282#discussion_r504892716



##########
File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
##########
@@ -970,36 +970,37 @@ public long getID() {
 
    @Override
    public int durableUp(Message message) {
-      int count = message.durableUp();
-      if (pagingStore != null) {
-         pagingStore.durableUp(message, count);
-      }
-      return count;
+      return message.durableUp();
    }
 
    @Override
    public int durableDown(Message message) {
-      int count = message.durableDown();
-      if (pagingStore != null) {
-         pagingStore.durableDown(message, count);
-      }
-      return count;
+      return message.durableDown();
    }
 
    @Override
-   public void refUp(Message message) {
-      int count = message.refUp();
+   public void refUp(MessageReference messageReference) {
+      int count = messageReference.getMessage().refUp();
+      if (count == 1) {
+         if (messageReference.getOwner() != null) {
+            
messageReference.getOwner().addSize(messageReference.getMessageMemoryEstimate());
+         }
+      }
       if (pagingStore != null) {
-         pagingStore.refUp(message, count);
+         pagingStore.refUp(messageReference.getMessage(), count);
       }
-
    }
 
    @Override
-   public void refDown(Message message) {
-      int count = message.refDown();
+   public void refDown(MessageReference messageReference) {
+      int count = messageReference.getMessage().refDown();
+      if (count == 0) {
+         if (messageReference.getOwner() != null) {
+            
messageReference.getOwner().addSize(-messageReference.getMessageMemoryEstimate());

Review comment:
       I would keep an else here, and just use this if null?
   
   Some unit tests may break without this?
   
   you're running the tests.. lets see.




----------------------------------------------------------------
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.

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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 500795)
    Time Spent: 4h  (was: 3h 50m)

> Strange Address Sizes on clustered topics.
> ------------------------------------------
>
>                 Key: ARTEMIS-2859
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2859
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 2.12.0, 2.14.0
>         Environment: uname -a
> Linux tarek02 4.4.0-78-generic #99-Ubuntu SMP Thu Apr 27 15:29:09 UTC 2017 
> x86_64 x86_64 x86_64 GNU/Linux
> java version "1.8.0_251"
> Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
> Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode)
>            Reporter: Tarek Hammoud
>            Assignee: Gary Tully
>            Priority: Major
>             Fix For: 2.16.0
>
>         Attachments: TestClusteredTopic.java, broker.xml, 
> image-2020-08-03-14-05-54-676.png, image-2020-08-03-14-05-54-720.png, 
> screenshot.png
>
>          Time Spent: 4h
>  Remaining Estimate: 0h
>
> !screenshot.png! Hello,
> We are seeing some strange AddressSizes in JMX for simple clustered topics. 
> The problem was observed on 2.12.0 in production but can also be reproduced 
> on 2.14.0. I set up a 3-node cluster (Sample broker.xml) attached. The test 
> program creates multiple clustered topic consumers. A publisher sends a 
> message every few seconds. The JMX console shows a strange address size on 
> one of the nodes. Easy to reproduce with the attached test program. Seems to 
> be fine with queues. 
> Thank you for help in advance.[^TestClusteredTopic.java][^broker.xml]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to