[
https://issues.apache.org/jira/browse/ARTEMIS-2571?focusedWorklogId=357221&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-357221
]
ASF GitHub Bot logged work on ARTEMIS-2571:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 10/Dec/19 16:30
Start Date: 10/Dec/19 16:30
Worklog Time Spent: 10m
Work Description: michaelandrepearce commented on pull request #2913:
ARTEMIS-2571 Remove synchronization of ActiveMQServerImpl#getSessions()
URL: https://github.com/apache/activemq-artemis/pull/2913#discussion_r356140076
##########
File path:
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
##########
@@ -294,7 +294,7 @@
private FileStoreMonitor fileStoreMonitor;
- private final Map<String, ServerSession> sessions = new
ConcurrentHashMap<>();
+ private final ConcurrentMap<String, ServerSession> sessions = new
ConcurrentHashMap<>();
Review comment:
Can a perf test or some other benefit for this change be provided. This is
core parts of the broker where historically concurrent issues introduced by
such small changes have had tragic effects. Comment is about whole pr with
removal of method level syncs
----------------------------------------------------------------
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: 357221)
Time Spent: 0.5h (was: 20m)
> Remove unneccessary synchronization in ActiveMQServerImpl
> ---------------------------------------------------------
>
> Key: ARTEMIS-2571
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2571
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Components: Broker, Web Console
> Affects Versions: 2.10.1
> Reporter: Sebastian T
> Priority: Minor
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> The ActiveMQServerImpl sessions field is a ConcurrentHashMap. Synchronizing
> on the ActiveMQServerImpl object to iterate over the map is not necessary.
> ActiveMQServerImpl#getSession, ActiveMQServerImpl#removeSession and
> ActiveMQServerImpl#createSession also work on the sessions field without
> synchronizing on the ActiveMQServerImpl.
> Removing the synchronized keyword on the ActiveMQServerImpl#getSessions()
> methods e.g. improves loading of Connections view, especially when multiple
> administrators are using the UI.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)