Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-3832

on 'discovery bindTopologyEventListener' an INIT event can be sent after CHANGING/CHANGED

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Discovery Impl 1.0.10
    • Discovery Impl 1.1.0
    • Extensions
    • None

    Description

      DiscoveryServiceImpl, in bindTopologyEventListener, does not correctly synchronize sending the INIT event - the INIT event is sent outside of synchronized(lock) - opening up the possibility of a race condition where bindTopologyEventListener happens while a CHANGING or CHANGED event is just being sent (which would hold the lock object), and an INIT could be sent after CHANGING and/or CHANGED.

      Basically:

      • even though the API guarantees that the order of events is always: INIT->CHANGING->CHANGED
      • it can happen, due to this bug, that you can first get CHANGING and/or CHANGED and then afterwards an INIT.
      • nevertheless, INIT is never called twice

      To fix this, bindTopologyEventListener needs to send the INIT event in the synchronized(lock) block

      Attachments

        Activity

          People

            stefanegli Stefan Egli
            stefanegli Stefan Egli
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: