[
https://issues.apache.org/jira/browse/ARTEMIS-2996?focusedWorklogId=512640&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-512640
]
ASF GitHub Bot logged work on ARTEMIS-2996:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 16/Nov/20 22:53
Start Date: 16/Nov/20 22:53
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_r524706268
##########
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 confused here.. it seems to me that you can either move the
synchronize to something specific to the address (synchronize (address) { //
the one you returned from getLinkedAddresses();
or the whole thing should be synchronized...
Are you sure this is the right thing?
----------------------------------------------------------------
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: 512640)
Time Spent: 8h 40m (was: 8.5h)
> 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 40m
> 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)