[
https://issues.apache.org/jira/browse/ARTEMIS-2996?focusedWorklogId=512725&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-512725
]
ASF GitHub Bot logged work on ARTEMIS-2996:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 17/Nov/20 04:50
Start Date: 17/Nov/20 04:50
Worklog Time Spent: 10m
Work Description: franz1981 commented on a change in pull request #3343:
URL: https://github.com/apache/activemq-artemis/pull/3343#discussion_r524882592
##########
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?
Sure, I'm going to do it now and will write a test to verify that I haven't
broken any concurrent behaviour...if not, the `synchronize` changes are a minor
if compared to the other improvements and we can address them later, given that
we now have the right tool (the benchmark) to spot regressions (on CI as well
;) )
----------------------------------------------------------------
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: 512725)
Time Spent: 9h 20m (was: 9h 10m)
> 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: 9h 20m
> 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)