You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by jbertram <gi...@git.apache.org> on 2018/12/10 18:43:32 UTC

[GitHub] activemq-artemis pull request #2458: ARTEMIS-2199 PagingStore leak when dele...

GitHub user jbertram opened a pull request:

    https://github.com/apache/activemq-artemis/pull/2458

    ARTEMIS-2199 PagingStore leak when deleting queue

    When deleting a queue the JMSPostQueueDeletionCallback#callback will
    invoke PostOfficeImpl#getBindingsForAddress which will *create* a
    Bindings instance if one doesn't exist. This will trigger the creation
    of a PagingStore instance which will be stored by the PagingManager
    and may never be deleted. This is particularly problematic for use-cases
    involving temporary JMS queues.
    
    This change uses the lookupBindingsForAddress instead of
    getBindingsForAddress which doesn't implicitly create a Bindings
    instance.
    
    This problem doesn't exist on the master branch as the
    JMSPostQueueDeletionCallback no longer exists there.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jbertram/activemq-artemis ARTEMIS-2199

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/2458.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2458
    
----
commit 6032fce45703d57be7e0a2542b443508674c406a
Author: Justin Bertram <jb...@...>
Date:   2018-12-10T18:13:37Z

    ARTEMIS-2199 PagingStore leak when deleting queue
    
    When deleting a queue the JMSPostQueueDeletionCallback#callback will
    invoke PostOfficeImpl#getBindingsForAddress which will *create* a
    Bindings instance if one doesn't exist. This will trigger the creation
    of a PagingStore instance which will be stored by the PagingManager
    and may never be deleted. This is particularly problematic for use-cases
    involving temporary JMS queues.
    
    This change uses the lookupBindingsForAddress instead of
    getBindingsForAddress which doesn't implicitly create a Bindings
    instance.
    
    This problem doesn't exist on the master branch as the
    JMSPostQueueDeletionCallback no longer exists there.

----


---

[GitHub] activemq-artemis pull request #2458: ARTEMIS-2199 PagingStore leak when dele...

Posted by jbertram <gi...@git.apache.org>.
Github user jbertram commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/2458#discussion_r242640005
  
    --- Diff: artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java ---
    @@ -1719,11 +1720,11 @@ public void callback(SimpleString queueName) throws Exception {
           @Override
           public void callback(SimpleString address, SimpleString queueName) throws Exception {
              Queue queue = server.locateQueue(address);
    -         Collection<Binding> bindings = server.getPostOffice().getBindingsForAddress(address).getBindings();
    --- End diff --
    
    I opened #2469 as a result of my investigation on the master branch.


---

[GitHub] activemq-artemis pull request #2458: ARTEMIS-2199 PagingStore leak when dele...

Posted by jbertram <gi...@git.apache.org>.
Github user jbertram closed the pull request at:

    https://github.com/apache/activemq-artemis/pull/2458


---

[GitHub] activemq-artemis pull request #2458: ARTEMIS-2199 PagingStore leak when dele...

Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/2458#discussion_r240419559
  
    --- Diff: artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java ---
    @@ -1719,11 +1720,11 @@ public void callback(SimpleString queueName) throws Exception {
           @Override
           public void callback(SimpleString address, SimpleString queueName) throws Exception {
              Queue queue = server.locateQueue(address);
    -         Collection<Binding> bindings = server.getPostOffice().getBindingsForAddress(address).getBindings();
    --- End diff --
    
    Is there a master counterpart for this fix?


---

[GitHub] activemq-artemis pull request #2458: ARTEMIS-2199 PagingStore leak when dele...

Posted by jbertram <gi...@git.apache.org>.
Github user jbertram commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/2458#discussion_r240429222
  
    --- Diff: artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java ---
    @@ -1719,11 +1720,11 @@ public void callback(SimpleString queueName) throws Exception {
           @Override
           public void callback(SimpleString address, SimpleString queueName) throws Exception {
              Queue queue = server.locateQueue(address);
    -         Collection<Binding> bindings = server.getPostOffice().getBindingsForAddress(address).getBindings();
    --- End diff --
    
    This callback doesn't exist on master so there's no direct counterpart for this fix. However, I do plan on reviewing all the usages of `getBindingsForAddress` to try to find similar problems.


---

[GitHub] activemq-artemis issue #2458: ARTEMIS-2199 PagingStore leak when deleting qu...

Posted by jbertram <gi...@git.apache.org>.
Github user jbertram commented on the issue:

    https://github.com/apache/activemq-artemis/pull/2458
  
    I've run the PR build locally and everything worked. I'm pushing this directly.


---