Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-1097

JChannel closed and connected flags should be volatile, make additional_data concurrent hashmap?

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 2.8
    • 2.8
    • None

    Description

      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.

      Attachments

        Activity

          People

            rhn-engineering-bban Bela Ban
            seamusdonohue1 Seamus Donohue (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: