activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [1/2] activemq-artemis git commit: ARTEMIS-1280 Avoiding leak on Queue futures
Date Tue, 11 Jul 2017 18:55:32 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/1.x 311072b28 -> e9b7b94de


ARTEMIS-1280 Avoiding leak on Queue futures


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

Branch: refs/heads/1.x
Commit: 8326a24fd87bdb8491db7b048b064aa01f9d7d33
Parents: 311072b
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Tue Jul 11 14:51:03 2017 -0400
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Tue Jul 11 14:51:03 2017 -0400

----------------------------------------------------------------------
 .../artemis/core/server/impl/QueueImpl.java        | 17 -----------------
 1 file changed, 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/8326a24f/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 040a996..897fde3 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
@@ -83,7 +83,6 @@ import org.apache.activemq.artemis.core.transaction.TransactionPropertyIndexes;
 import org.apache.activemq.artemis.core.transaction.impl.BindingsTransactionImpl;
 import org.apache.activemq.artemis.core.transaction.impl.TransactionImpl;
 import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
-import org.apache.activemq.artemis.utils.ConcurrentHashSet;
 import org.apache.activemq.artemis.utils.FutureLatch;
 import org.apache.activemq.artemis.utils.LinkedListIterator;
 import org.apache.activemq.artemis.utils.PriorityLinkedList;
@@ -200,12 +199,8 @@ public class QueueImpl implements Queue {
 
    private Redistributor redistributor;
 
-   private final Set<ScheduledFuture<?>> futures = new ConcurrentHashSet<>();
-
    private ScheduledFuture<?> redistributorFuture;
 
-   private ScheduledFuture<?> checkQueueSizeFuture;
-
    // We cache the consumers here since we don't want to include the redistributor
 
    private final AtomicInteger consumersCount = new AtomicInteger();
@@ -642,10 +637,6 @@ public class QueueImpl implements Queue {
 
    @Override
    public void close() throws Exception {
-      if (checkQueueSizeFuture != null) {
-         checkQueueSizeFuture.cancel(false);
-      }
-
       getExecutor().execute(new Runnable() {
          @Override
          public void run() {
@@ -793,8 +784,6 @@ public class QueueImpl implements Queue {
             DelayedAddRedistributor dar = new DelayedAddRedistributor(executor);
 
             redistributorFuture = scheduledExecutor.schedule(dar, delay, TimeUnit.MILLISECONDS);
-
-            futures.add(redistributorFuture);
          }
       } else {
          internalAddRedistributor(executor);
@@ -806,8 +795,6 @@ public class QueueImpl implements Queue {
       redistributorFuture = null;
       if (future != null) {
          future.cancel(false);
-
-         futures.remove(future);
       }
    }
 
@@ -826,10 +813,6 @@ public class QueueImpl implements Queue {
 
    @Override
    protected void finalize() throws Throwable {
-      if (checkQueueSizeFuture != null) {
-         checkQueueSizeFuture.cancel(false);
-      }
-
       cancelRedistributor();
 
       super.finalize();


Mime
View raw message