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 2016/10/19 19:35:34 UTC

[1/3] activemq-artemis git commit: [ARTEMIS-708] Incorrect ConcurrentHashSet.remove call in QueueImpl.DelayedAddRedistributor.run

Repository: activemq-artemis
Updated Branches:
  refs/heads/master 813f2532d -> ad602780c


[ARTEMIS-708] Incorrect ConcurrentHashSet.remove call in QueueImpl.DelayedAddRedistributor.run


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

Branch: refs/heads/master
Commit: 028f92ffa5258bb8c9dd7df994b2c75cbd7ecd32
Parents: 813f253
Author: bayern39 <ja...@163.com>
Authored: Wed Oct 19 15:53:10 2016 +0800
Committer: Clebert Suconic <cl...@apache.org>
Committed: Wed Oct 19 15:04:52 2016 -0400

----------------------------------------------------------------------
 .../org/apache/activemq/artemis/core/server/impl/QueueImpl.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/028f92ff/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
index 5ece228..9e610b2 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
@@ -2709,7 +2709,7 @@ public class QueueImpl implements Queue {
          synchronized (QueueImpl.this) {
             internalAddRedistributor(executor1);
 
-            futures.remove(this);
+            futures.remove(redistributorFuture);
          }
       }
    }


[3/3] activemq-artemis git commit: This closes #851

Posted by cl...@apache.org.
This closes #851


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

Branch: refs/heads/master
Commit: ad602780c797ff1ae113b1934a834886b736f232
Parents: 813f253 ac69fed
Author: Clebert Suconic <cl...@apache.org>
Authored: Wed Oct 19 15:35:12 2016 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Wed Oct 19 15:35:12 2016 -0400

----------------------------------------------------------------------
 .../artemis/core/server/impl/QueueImpl.java     | 24 +++++++++++---------
 1 file changed, 13 insertions(+), 11 deletions(-)
----------------------------------------------------------------------



[2/3] activemq-artemis git commit: [ARTEMIS-708] small improvements on remove call from DelayedAddRedistributor

Posted by cl...@apache.org.
[ARTEMIS-708] small improvements on remove call from DelayedAddRedistributor


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

Branch: refs/heads/master
Commit: ac69fed4e78a9463c4e52dd010346c69d86e1268
Parents: 028f92f
Author: Clebert Suconic <cl...@apache.org>
Authored: Wed Oct 19 15:34:37 2016 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Wed Oct 19 15:34:37 2016 -0400

----------------------------------------------------------------------
 .../artemis/core/server/impl/QueueImpl.java     | 24 +++++++++++---------
 1 file changed, 13 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ac69fed4/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
index 9e610b2..d515b3d 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
@@ -768,11 +768,7 @@ public class QueueImpl implements Queue {
 
    @Override
    public synchronized void addRedistributor(final long delay) {
-      if (redistributorFuture != null) {
-         redistributorFuture.cancel(false);
-
-         futures.remove(redistributorFuture);
-      }
+      clearRedistributorFuture();
 
       if (redistributor != null) {
          // Just prompt delivery
@@ -792,6 +788,16 @@ public class QueueImpl implements Queue {
       }
    }
 
+   private void clearRedistributorFuture() {
+      ScheduledFuture<?> future = redistributorFuture;
+      redistributorFuture = null;
+      if (future != null) {
+         future.cancel(false);
+
+         futures.remove(future);
+      }
+   }
+
    @Override
    public synchronized void cancelRedistributor() throws Exception {
       if (redistributor != null) {
@@ -802,11 +808,7 @@ public class QueueImpl implements Queue {
          removeConsumer(redistributorToRemove);
       }
 
-      if (redistributorFuture != null) {
-         redistributorFuture.cancel(false);
-
-         redistributorFuture = null;
-      }
+      clearRedistributorFuture();
    }
 
    @Override
@@ -2709,7 +2711,7 @@ public class QueueImpl implements Queue {
          synchronized (QueueImpl.this) {
             internalAddRedistributor(executor1);
 
-            futures.remove(redistributorFuture);
+            clearRedistributorFuture();
          }
       }
    }