Uploaded image for project: 'Aries'
  1. Aries
  2. ARIES-1817

Export remove do not always end up in REMOVE events (timing issue)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • rsa-1.12.0
    • rsa-1.13.0
    • Remote Service Admin
    • None
    • Patch

    Description

      During testing aries RSA I found several situations where my discovery did not received a remove event. After some inspection I found that

      org.apache.aries.rsa.core.ExportRegistrationImpl#getExportReference returns only the reference instance when its not closed, otherwise null.

      Usually I expected that the ExportRegistration is closed by the TopologyManager, in this case org.apache.aries.rsa.topologymanager.exporter.ServiceExportRepository. But thats not true. While debugging I saw that sometimes org.apache.aries.rsa.core.RemoteServiceAdminCore#removeServiceExports closes the ExportRegistration a little bit earlier. That leads to a null ExportReference instance in ServiceExportRepository#closeReg, which in return leads to no remove event.

      So, there is no single point of truth, who closes the ExportRegistration. Citing the Spec 122.5.1:

      The Export Registrations remain open until:

      Explicitly closed by the Topology Manager, or

      The Remote Service Admin service is no longer used by the Topology Manager that created the Export Registration.

      If the Remote Service Admin service can no longer maintain the corresponding Endpoint due to failures than these should be reported through the events. However, the registrations should remain open until explicitly closed by the Topology Manager.

      I attached a patch, that solve the problem, but is as well not compliant to the spec, like the current implementation.

       

       

      Attachments

        1. ServiceExportsRepository.patch
          7 kB
          Mark Hoffmann

        Activity

          People

            cschneider Christian Schneider
            m.hoffmann Mark Hoffmann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: