ManagedService[Factory] may be updated twice with the same Configuration
------------------------------------------------------------------------
Key: FELIX-516
URL: https://issues.apache.org/jira/browse/FELIX-516
Project: Felix
Issue Type: Bug
Components: Configuration Admin
Reporter: Felix Meschberger
Assignee: Felix Meschberger
The Configuration Admin service implementation has a multi-threading issue in
that a configuration may be delivered to a ManagedService[Factory] twice under
certain conditions.
Consider the situation of thread Threads T1 registering a
ManagedServiceFactory, T2 creating and updating a configuration object for the
ManagedServiceFactory registered by T1 and T3 the background thread managed by
the Configuration Admin Service to serialize configuration updates.
Thread T1 was registering a ManagedServiceFactory
In T1 the ConfigurationAdmin service sees the service and schedules
configuration of it
Thread T2 was creating and setting a configuration C
In T2 the ConfigurationAdmin service schedules the update of the
ManagedServiceFactory
Thread T3 handles the first scheduled task of initially providing the
service with configuration
(created by T1 in the meantime)
Thread T3 handles the second scheduled task of updating the configuration
Hence the ManagedServiceFactory is updated twice with the same configuration
and thus cycles the service.
The fix is to record in the Configuration object that it was sent to the
consuming service and to prevent sending the update of a configuration, which
has already been sent.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.