You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@artemis.apache.org by "amarkevich (via GitHub)" <gi...@apache.org> on 2026/10/01 09:10:02 UTC

[PR] MQTTStateManager: drop synchronized in favor of ConcurrentHashMap [artemis]

amarkevich opened a new pull request, #6757:
URL: https://github.com/apache/artemis/pull/6757

   (no comment)


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

To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org


Re: [PR] MQTTStateManager: drop synchronized in favor of ConcurrentHashMap [artemis]

Posted by "jbertram (via GitHub)" <gi...@apache.org>.
jbertram commented on PR #6757:
URL: https://github.com/apache/artemis/pull/6757#issuecomment-5976646976

   Is there a particular motivation for this change? All I can see is a minor reduction in code complexity.


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

To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org


Re: [PR] MQTTStateManager: drop synchronized in favor of ConcurrentHashMap [artemis]

Posted by "amarkevich (via GitHub)" <gi...@apache.org>.
amarkevich commented on PR #6757:
URL: https://github.com/apache/artemis/pull/6757#issuecomment-5978745583

   > Is there a particular motivation for this change? All I can see is a minor reduction in code complexity.
   
   yes - align multi-thread logic to use synchronized collections


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

To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org


Re: [PR] MQTTStateManager: drop synchronized in favor of ConcurrentHashMap [artemis]

Posted by "jbertram (via GitHub)" <gi...@apache.org>.
jbertram commented on code in PR #6757:
URL: https://github.com/apache/artemis/pull/6757#discussion_r4186422427


##########
artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTStateManager.java:
##########
@@ -112,21 +112,15 @@ void clear(String clientId) {
     * one instance of MQTTSessionStateManager per-broker with the understanding that there can be multiple brokers in
     * the same JVM.
     */
-   public static synchronized MQTTStateManager getInstance(ActiveMQServer server) throws Exception {
-      MQTTStateManager instance = INSTANCES.get(System.identityHashCode(server));
-      if (instance == null) {
-         instance = new MQTTStateManager(server);
-         INSTANCES.put(System.identityHashCode(server), instance);
-      }
-
-      return instance;
+   public static MQTTStateManager getInstance(ActiveMQServer server) throws Exception {

Review Comment:
   The `throws Exception` is no longer necessary here.



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

To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org


Re: [PR] MQTTStateManager: drop synchronized in favor of ConcurrentHashMap [artemis]

Posted by "jbertram (via GitHub)" <gi...@apache.org>.
jbertram commented on PR #6757:
URL: https://github.com/apache/artemis/pull/6757#issuecomment-5998829063

   I opened https://issues.apache.org/jira/browse/ARTEMIS-6286 for this. You should reference it in your commit message along with a shorter description to adhere to [our standards](https://artemis.apache.org/components/artemis/documentation/hacking-guide/#commitMessageDetails).


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

To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org


Re: [PR] ARTEMIS-6286 Use concurrent map for MQTTStateManager instances [artemis]

Posted by "jbertram (via GitHub)" <gi...@apache.org>.
jbertram merged PR #6757:
URL: https://github.com/apache/artemis/pull/6757


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

To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org