AntonRoskvist commented on PR #4705: URL: https://github.com/apache/activemq-artemis/pull/4705#issuecomment-1847792682
No, I have only been able to get an idea of what happens after the fact... the window of opportunity for this to happen is really slim... In fact, early in my troubleshooting I tried to add logging in Postoffice and the Clusterconnection for the notifications but doing so seemingly added enough of a delay to not trigger the issue (at least in the setup i used to reproduce, it's possible it would happen given different run values for the reproducer). From what I can gather at least, locally everything happens in the correct order. Local counters have always been correct. My **guess** would be that in some circumstance the servers `createQueue()` can take some time to finish, such that it allows a binding to get added, but before the BINDING_ADDED notification is sent, a call to the ServerConsumers `createConsumer()` is issued... this call requires no synchronization on Postoffice (as far as I can tell) and so its able to finish (and send its notification) before the servers `createQueue()` finishes all the way and sends its own notification. So... my assumption is that something along those lines are causing this, which is why I added synchronization on Postoffice before allowing `createConsumer()` to send its notification (since it's `addBinding()` in Postoffice that sends the BINDING_ADDED notification). After making that change I have been unable to reproduce the issue again. If it where to happen again though, the changes made in `RemoteQueueBindingImpl` should stop the redistributor from causing any issues regardless, but I'd much rather understand everything that's going on here for sure, if nothing else to be able to write a better reproducer for this... -- 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]
