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 2021/10/12 16:08:50 UTC

[GitHub] [activemq-artemis] clebertsuconic commented on a change in pull request #3791: ARTEMIS-3525 Empty Auto Created queues should be removed on restart

clebertsuconic commented on a change in pull request #3791:
URL: https://github.com/apache/activemq-artemis/pull/3791#discussion_r727290971



##########
File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
##########
@@ -1855,12 +1857,16 @@ private static boolean queueWasUsed(Queue queue) {
 
    /** To be used by the AddressQueueReaper.
     * It is also exposed for tests through PostOfficeTestAccessor */
-   void reapAddresses() {
+   void reapAddresses(boolean initialCheck) {
       getLocalQueues().forEach(queue -> {
-         if (!queue.isInternalQueue() && QueueManagerImpl.isAutoDelete(queue) && QueueManagerImpl.consumerCountCheck(queue) && QueueManagerImpl.delayCheck(queue) && QueueManagerImpl.messageCountCheck(queue) && queueWasUsed(queue)) {
-            if (queue.isSwept()) {
+         if (!queue.isInternalQueue() && QueueManagerImpl.isAutoDelete(queue) && QueueManagerImpl.consumerCountCheck(queue) && QueueManagerImpl.delayCheck(queue) && QueueManagerImpl.messageCountCheck(queue) && (queueWasUsed(queue) || initialCheck)) {

Review comment:
       doing my own review here, I should ignore the delayCheck upon restart




-- 
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.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org