activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cshan...@apache.org
Subject [2/2] activemq git commit: Revert "AMQ-6947 - Make sure counters are updated correct on message drop"
Date Wed, 18 Apr 2018 16:34:49 GMT
Revert "AMQ-6947 - Make sure counters are updated correct on message drop"

This reverts commit 021c82859cf4361eb31b21fdbac17655ae9e368d.


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/1d2226e6
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/1d2226e6
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/1d2226e6

Branch: refs/heads/master
Commit: 1d2226e6cfc110c0b8456f9c5775ce1a6cdf0ac5
Parents: 7123534
Author: Christopher L. Shannon (cshannon) <christopher.l.shannon@gmail.com>
Authored: Wed Apr 18 12:34:18 2018 -0400
Committer: Christopher L. Shannon (cshannon) <christopher.l.shannon@gmail.com>
Committed: Wed Apr 18 12:34:18 2018 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/activemq/broker/region/Queue.java    | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/1d2226e6/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java b/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java
index 64f1da2..ff55e2f 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java
@@ -1869,12 +1869,11 @@ public class Queue extends BaseDestination implements Task, UsageListener,
Index
     private void dropMessage(QueueMessageReference reference) {
         //use dropIfLive so we only process the statistics at most one time
         if (reference.dropIfLive()) {
+            getDestinationStatistics().getDequeues().increment();
+            getDestinationStatistics().getMessages().decrement();
             pagedInMessagesLock.writeLock().lock();
             try {
-                if (pagedInMessages.remove(reference) != null) {
-                    getDestinationStatistics().getDequeues().increment();
-                    getDestinationStatistics().getMessages().decrement();
-                }
+                pagedInMessages.remove(reference);
             } finally {
                 pagedInMessagesLock.writeLock().unlock();
             }


Mime
View raw message