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/25 09:51:40 UTC

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

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