[ 
https://issues.apache.org/jira/browse/ARTEMIS-2996?focusedWorklogId=512653&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-512653
 ]

ASF GitHub Bot logged work on ARTEMIS-2996:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 16/Nov/20 23:28
            Start Date: 16/Nov/20 23:28
    Worklog Time Spent: 10m 
      Work Description: clebertsuconic commented on a change in pull request 
#3343:
URL: https://github.com/apache/activemq-artemis/pull/3343#discussion_r524747586



##########
File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/WildcardAddressManager.java
##########
@@ -221,19 +221,21 @@ private void addAddress(final SimpleString address, final 
Address actualAddress)
       }
    }
 
-   private synchronized void removeAndUpdateAddressMap(final Address address) 
throws Exception {
+   private void removeAndUpdateAddressMap(final Address address) throws 
Exception {
       // we only remove if there are no bindings left
       Bindings bindings = 
super.getBindingsForRoutingAddress(address.getAddress());
-      if (bindings == null || bindings.getBindings().size() == 0) {
-         List<Address> addresses = address.getLinkedAddresses();
-         for (Address address1 : addresses) {
-            address1.removeLinkedAddress(address);
-            Bindings linkedBindings = 
super.getBindingsForRoutingAddress(address1.getAddress());
-            if (linkedBindings == null || linkedBindings.getBindings().size() 
== 0) {
-               removeAddress(address1);
+      if (bindings == null || bindings.getBindings().isEmpty()) {
+         synchronized (this) {
+            List<Address> addresses = address.getLinkedAddresses();

Review comment:
       I'm also concerned with the dependency added.. can we move it to 
extra-tests?




----------------------------------------------------------------
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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 512653)
    Time Spent: 8h 50m  (was: 8h 40m)

> Provide JMH Benchmarks for Artemis
> ----------------------------------
>
>                 Key: ARTEMIS-2996
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2996
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Tests
>            Reporter: Francesco Nigro
>            Assignee: Francesco Nigro
>            Priority: Major
>          Time Spent: 8h 50m
>  Remaining Estimate: 0h
>
> In order to reliably measure performance of many Artemis component would be 
> welcome to implement some https://github.com/openjdk/jmh benchmarks to be 
> used for development purposes ie not part of the release



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to