pderop opened a new pull request, #604:
URL: https://github.com/apache/felix-dev/pull/604

   Motivation:
   
   When a tracked service modifies its service.ranking, the event kept in the 
component's sorted set of dependency events changes its ordering key while it 
is stored in the set. The following remove() no longer finds it and add() 
inserts a duplicate. A stale entry can remain after all services are gone, so a 
required dependency stays available without any provider and the service is 
never released.
   
   Modification:
   
   ServiceEventImpl now orders on a snapshot of the service ranking and id 
instead of reading the live ServiceReference. On a modified event, 
ComponentImpl removes the event with its old key, refreshes the ranking, then 
adds it back. A unit test reproduces the scenario.
   
   Result:
   
   The dependency events stay consistent after a ranking change: a required 
dependency becomes unavailable once all its services are unregistered, and the 
services are released.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to