You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Guillaume Nodet (JIRA)" <ji...@apache.org> on 2014/07/28 22:35:39 UTC

[jira] [Commented] (FELIX-4566) Consistency in PersistenceManager and Cache is not guaranteed

    [ https://issues.apache.org/jira/browse/FELIX-4566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14076789#comment-14076789 ] 

Guillaume Nodet commented on FELIX-4566:
----------------------------------------

I think the patch is not sufficient.
We should provide some kind of synchronization for concurrent access to the cache and the getDictionaries() method returns an enumeration directly on the Hashtable which is not guarded.
I'm also not sure if eagerly loading the entries is a good idea, as it would result in an exception thrown from a totally different place and i'm not sure it's really supported.
I wonder if it would be easier to sync on a single global lock...
Thoughts ?

> 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.2#6252)