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/07/24 18:02:53 UTC

[GitHub] [activemq] cshannon commented on pull request #553: AMQ-8012 Fix ConcurrentModifictionException in SubQueueSelectorCacheBroker

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