jbertram commented on a change in pull request #2799: ARTEMIS-2453 Fixing
deadLock between destroyQueue and removeAddressInfo
URL: https://github.com/apache/activemq-artemis/pull/2799#discussion_r314367295
##########
File path:
artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
##########
@@ -649,9 +647,7 @@ public AddressInfo removeAddressInfo(SimpleString address,
boolean force) throws
@Override
public AddressInfo getAddressInfo(SimpleString addressName) {
- synchronized (addressLock) {
- return addressManager.getAddressInfo(addressName);
- }
+ return addressManager.getAddressInfo(addressName);
Review comment:
I don't see a need for the `synchronized (addressLock)` given that the
underlying data structure in the address manager is a `ConcurrentHashMap` and
no other operations are being done (unlike in the other places which use
`addressLock`). I think this fix looks good.
----------------------------------------------------------------
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]
With regards,
Apache Git Services