[ 
https://issues.apache.org/jira/browse/AMQ-9123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17618425#comment-17618425
 ] 

Lucas Tétreault edited comment on AMQ-9123 at 10/17/22 5:14 AM:
----------------------------------------------------------------

Hey [~shikhar97gupta], I think it could be a good first issue. I made quick 
change to clear all the collections 
([here|https://github.com/apache/activemq/commit/691bd836e624478361716c4a4091895f9ab472d4])
 and ran all the tests just to see if anything unexpected popped up. I just 
checked and it looks like there was some flaky test that failed so I just 
restarted the tests. Anyway, we probably want a bunch of unit tests that 
validate that all the collections are empty after we add subscribers, topics, 
queues, etc. If you want to take a crack at it go for it (y)


was (Author: tetlucas):
Hey [~shikhar97gupta], I think it could be a good first issue. I made quick 
change to clear all the collections 
([here|https://github.com/apache/activemq/commit/691bd836e624478361716c4a4091895f9ab472d4])
 and ran all the tests just to see if anything unexpected popped up. I just 
checked and it looks like there was some flaky test that failed so I just 
restarted the tests. Anyway, we probably want a bunch of unit tests that 
validate that all the collections are empty after we add subscribers, topics, 
queues, etc. If you want to take a crack at it go for it :+1: 

> ManagedRegionBroker should clear its various caches when stopped
> ----------------------------------------------------------------
>
>                 Key: AMQ-9123
>                 URL: https://issues.apache.org/jira/browse/AMQ-9123
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: JMX
>    Affects Versions: 5.17.2
>            Reporter: Lucas Tétreault
>            Priority: Trivial
>
> Matt noticed that when ManagedRegionBroker is stopped only the registered 
> mbeans are cleaned up but the various collections that hold queues, topics, 
> subscribers, etc. are never cleared. Therefore, if a broker is stopped and 
> started the caches will have previous run data in them.
> This code appears to have been this way since 2006 but we should likely clean 
> up the collections when the broker is stopped assuming there are no intended 
> side-effects in leaving them with previous run data.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to