cshannon commented on pull request #553:
URL: https://github.com/apache/activemq/pull/553#issuecomment-663662979


   The issue here seems to be that the selector Set itself is synchronized but 
the lock is not used when iterating. 
   
   
https://github.com/apache/activemq/blob/activemq-5.16.0/activemq-broker/src/main/java/org/apache/activemq/plugin/SubQueueSelectorCacheBroker.java#L150
   
   The other method called getSelectorsForDestination() appears to copy into a 
new HashSet but that method also isn't safe either as it doesn't lock while 
creating the new HashSet (it will iterate and copy into the new set before 
returning)
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to