AntonRoskvist commented on PR #4705: URL: https://github.com/apache/activemq-artemis/pull/4705#issuecomment-1899178681
Hello @jbertram I had some time to look further into this and came up with another fix and reproducer/test which seem to work better. The main issue is that in some very race conditions the broker will send out it's notification for an added consumer before sending the binding_added notification for the queue the consumer is bound to. From my testing this seems to happen when `postOfficeImpl#addBinding()` has _just_ added the actual binding to addressManager, but not yet called `managementService.sendNotification()` so that the unsynchronized `postOfficeImpl#getBinding()` will return it for ServerSessionImpl#createConsumer() and enabling it to lock the `managementService` before postOffice is able to. I have not been able to point out _exactly_ what conditions has to be met for this to occur, but the new test included in this change works reliably to triggering the first issue in the chain leading up the "redistributor race" i.e getting the clusters remoteBindings out of sync with regards to their consumer count. I'm removing the "Draft" status as of now but please let me know if anything looks off about these changes. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
