[
https://issues.apache.org/jira/browse/FELIX-4566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14118056#comment-14118056
]
Ioannis Canellos commented on FELIX-4566:
-----------------------------------------
Even though getDictionaries() doesn't affect the consistency between cache/file
persistance it should still be guarded so that it always returns the "snapshot"
of the cache.
Regarding, the eager loading I am not sure. Personally, I think that since the
service is backed by files its better to have an error during initialisation
than later in the processes. For what it worths, I switched to eager loading so
that I can be able to use a lock per pid. But since the getDictionaries() will
require a global lock, then yes most probably will can switch back to lazy
loading too.
> Consistency in PersistenceManager and Cache is not guaranteed
> -------------------------------------------------------------
>
> Key: FELIX-4566
> URL: https://issues.apache.org/jira/browse/FELIX-4566
> Project: Felix
> Issue Type: Bug
> Components: Configuration Admin
> Affects Versions: configadmin-1.8.2
> Reporter: Ioannis Canellos
> Assignee: Guillaume Nodet
> Attachments: FELIX-4566-2.patch, FELIX-4566.patch
>
>
> Currently the store method in the CachingPersistenceManagerProxy performs an
> update on the PersistenceManager and then also updates the Cache.
> Since we are updating 2 resources, without any form of synchronisation its
> possible that the resources are out of sync.
> For example:
> Two threads A and B call configuration.update() on the same pid. The first
> threads calls store(), the PersistenceManager gets updated and then the
> second thread kicks in updates both PersistenceManager and the cache and
> finally the first thread updates the cache.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)