Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-83974

ServiceTrackerMap is behaving incorrectly when tracked services get service.ranking property modified using ServiceRegistration.setProperties()

    Details

      Description

      OSGi ServiceReferences are mutable structures and ServiceTrackerMap is storing them in ordered data structures such as TreeSet. If the ServiceReference is later mutated while is it being held in such a structure it can happen that it can't be found anymore, since the search path inside the data structure depends on the relative order of the instance with the other already stored instances.
      As a result you might end up seeing the same ServiceReference more than once stored in the same bucket, and also some of those ServiceReference can't ever be removed.

        Attachments

          Activity

            People

            Assignee:
            brian.chan Brian Chan
            Reporter:
            carlos.sierra Carlos Sierra
            Participants of an Issue:
            Recent user:
            Brian Wulbern
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              2 years, 24 weeks, 1 day ago

                Packages

                Version Package
                7.1.10 DXP FP1
                7.1.1 CE GA2
                7.1.10.1 SP1