You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2020/02/22 00:36:23 UTC

[GitHub] [activemq-artemis] jbertram opened a new pull request #2992: ARTEMIS-2629 ensure queue auto-delete after expiration

jbertram opened a new pull request #2992: ARTEMIS-2629 ensure queue auto-delete after expiration
URL: https://github.com/apache/activemq-artemis/pull/2992
 
 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-artemis] brusdev commented on a change in pull request #2992: ARTEMIS-2629 ensure queue auto-delete after expiration

Posted by GitBox <gi...@apache.org>.
brusdev commented on a change in pull request #2992: ARTEMIS-2629 ensure queue auto-delete after expiration
URL: https://github.com/apache/activemq-artemis/pull/2992#discussion_r383769152
 
 

 ##########
 File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueManagerImpl.java
 ##########
 @@ -84,8 +84,7 @@ public static boolean messageCountCheck(Queue queue) {
    }
 
    public static boolean delayCheck(Queue queue) {
-      long consumerRemovedTimestamp =  queue.getConsumerRemovedTimestamp();
-      return consumerRemovedTimestamp != -1 && System.currentTimeMillis() - consumerRemovedTimestamp >= queue.getAutoDeleteDelay();
+      return System.currentTimeMillis() - queue.getConsumerRemovedTimestamp() >= queue.getAutoDeleteDelay();
 
 Review comment:
   Removing the condition `consumerRemovedTimestamp != -1` could change the semantic of the **public** method `delayCheck`. With this change `delayCheck` will return **true** before removing a consumer.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-artemis] jbertram commented on a change in pull request #2992: ARTEMIS-2629 ensure queue auto-delete after expiration

Posted by GitBox <gi...@apache.org>.
jbertram commented on a change in pull request #2992: ARTEMIS-2629 ensure queue auto-delete after expiration
URL: https://github.com/apache/activemq-artemis/pull/2992#discussion_r383928613
 
 

 ##########
 File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueManagerImpl.java
 ##########
 @@ -84,8 +84,7 @@ public static boolean messageCountCheck(Queue queue) {
    }
 
    public static boolean delayCheck(Queue queue) {
-      long consumerRemovedTimestamp =  queue.getConsumerRemovedTimestamp();
-      return consumerRemovedTimestamp != -1 && System.currentTimeMillis() - consumerRemovedTimestamp >= queue.getAutoDeleteDelay();
+      return System.currentTimeMillis() - queue.getConsumerRemovedTimestamp() >= queue.getAutoDeleteDelay();
 
 Review comment:
   It *will* change the semantic, and that was intended. This particular check is no longer desirable as it will preclude auto-deleting a queue where all the messages have expired but no consumer has ever connected. I implemented a new check in `org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl.AddressQueueReaper#queueWasUsed` which resolves this issue. The `delayCheck` method is only used internally as it's not part of the user-facing API so I don't have any qualms with changing its semantics.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-artemis] asfgit closed pull request #2992: ARTEMIS-2629 ensure queue auto-delete after expiration

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #2992: ARTEMIS-2629 ensure queue auto-delete after expiration
URL: https://github.com/apache/activemq-artemis/pull/2992
 
 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services