[jboss-jira] [JBoss JIRA] (JGRP-1414) Synchronizing on 'members' MessageDispatcher.cast() is a contention point

Bela Ban (JIRA) jira-events at lists.jboss.org
Sun Jan 15 05:37:18 EST 2012


     [ https://issues.jboss.org/browse/JGRP-1414?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bela Ban updated JGRP-1414:
---------------------------

       Fix Version/s: 3.1
    Git Pull Request: https://github.com/belaban/JGroups/pull/23  (was: https://github.com/belaban/JGroups/pull/23)

    
> Synchronizing on 'members' MessageDispatcher.cast() is a contention point
> -------------------------------------------------------------------------
>
>                 Key: JGRP-1414
>                 URL: https://issues.jboss.org/browse/JGRP-1414
>             Project: JGroups
>          Issue Type: Bug
>    Affects Versions: 3.0.2
>            Reporter: Manik Surtani
>            Assignee: Manik Surtani
>              Labels: concurrency, performance
>             Fix For: 3.0.3, 3.1
>
>         Attachments: TreeSet.png
>
>
> MessageDispatcher.cast() synchronizes on {{members}} and copies it to a local collection if {{null}} is passed in as your destination list.  This is a contention point if you have many concurrent threads attempting to cast() to the entire cluster, as they start queueing up at this point.
> Guarding {{members}} with a ReadWriteLock is probably a better approach, allowing {{members}} to be read safely and concurrently.
> However, since {{members}} is protected, I am not sure of the implications around this.  But then again, there is no guarantee that subclasses/extensions synchronize on {{members}} anyway.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list