tabish121 commented on code in PR #4972:
URL: https://github.com/apache/activemq-artemis/pull/4972#discussion_r1639020568
##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/SimpleAddressManager.java:
##########
@@ -116,7 +121,15 @@ public Binding removeBinding(final SimpleString
uniqueName, Transaction tx) thro
return null;
}
- removeBindingInternal(binding.getA().getAddress(), uniqueName);
+ SimpleString address = binding.getA().getAddress();
+ removeBindingInternal(address, uniqueName);
+ Collection<Binding> directBindings = directBindingMap.get(address);
+ if (directBindings != null) {
+ directBindings.remove(binding.getA());
+ if (directBindings.isEmpty()) {
Review Comment:
Isn't there a race condition here in that the directBindings collection
might report empty here but a new binding could be added between this check and
the next call to remove the bindings entry from the Map meaning that the
tracked state is now inconsistent with reality?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact