[jboss-jira] [JBoss JIRA] Commented: (JGRP-1097) JChannel closed and connected flags should be volatile, make additional_data concurrent hashmap?

Seamus Donohue (JIRA) jira-events at lists.jboss.org
Tue Nov 10 02:35:05 EST 2009


    [ https://jira.jboss.org/jira/browse/JGRP-1097?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12493922#action_12493922 ] 

Seamus Donohue commented on JGRP-1097:
--------------------------------------

ok I see how the additional_data is used -thanks for clarification...
BTW I just happened to be working on options and views after creating this JIRA - should the following also be volatile ? receive_blocks,receive_local_msgs, my_view- as read/modified by Object up(Event evt) using protocol stack threads and set/read by JMX/pub methods. 


> JChannel closed and connected flags should be volatile, make additional_data concurrent hashmap?
> ------------------------------------------------------------------------------------------------
>
>                 Key: JGRP-1097
>                 URL: https://jira.jboss.org/jira/browse/JGRP-1097
>             Project: JGroups
>          Issue Type: Bug
>    Affects Versions: 2.8
>         Environment: Linux 2.6.28-15-generic #49-Ubuntu SMP,x86_64 GNU/Linux, java version "1.6.0_16",Java HotSpot(TM) 64-Bit Server VM (build 14.2-b01, mixed mode)
>            Reporter: Seamus Donohue
>            Assignee: Bela Ban
>             Fix For: 2.8
>
>         Attachments: sd.patch
>
>
> using latest sourceforge cvs repository snapshot (from logger 'INFO: JGroups version: 2.8.0.CR6').
> while this is not causing any noticicable failures in our testing I noticed that the 
> connected and closed flags are set in synchronized but read in unsynchronized methods - patch file attached.
> *note* also attached in patch : made additional_data a concurrent hashmap:
> protected final Map<String,Object> additional_data=new ConcurrentHashMap<String,Object>();
> as I think concurrently executing send(Message msg) operations which call ' down(new Event(Event.MSG, msg));' 
> which in turn calls additional_data.putAll(m) will result in inconsistent hashmap state if putAll operations are concurrent 
> but as I am unfamiliar with the code I am not sure what is the best way to address this.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list