[jbosscache-issues] [JBoss JIRA] Updated: (JBCACHE-1553) Potential possibility to avoid some (most?) locking in CacheLoaderInterceptor.loadChildren()

Krzysztof Sobolewski (JIRA) jira-events at lists.jboss.org
Thu Oct 29 11:56:06 EDT 2009


     [ https://jira.jboss.org/jira/browse/JBCACHE-1553?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Krzysztof Sobolewski updated JBCACHE-1553:
------------------------------------------

    Attachment: LoadChildrenChildLockingTest-fix.diff


The proposed patch.

> Potential possibility to avoid some (most?) locking in CacheLoaderInterceptor.loadChildren()
> --------------------------------------------------------------------------------------------
>
>                 Key: JBCACHE-1553
>                 URL: https://jira.jboss.org/jira/browse/JBCACHE-1553
>             Project: JBoss Cache
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Cache loaders
>    Affects Versions: 3.2.1.GA
>            Reporter: Krzysztof Sobolewski
>            Assignee: Manik Surtani
>         Attachments: LoadChildrenChildLockingTest-fix.diff, LoadChildrenChildLockingTest.java
>
>
> We create new nodes in memory with "children loaded" flag always set to false, because we cannot efficiently check whether this is a purely new node or it exists in evicted state. This flag can be happily set to false for a very long time, until someone calls getChildrenNames() (or similar); at this moment CacheLoaderInterceptor decides it must load the node's children from the cache loader, in case there are some that weren't accessed recently enough for them to be activated. In the process, it locks the node *and* all the children nodes.
> I think the locking of children can be avoided if the child was already in memory. I filed this as a bug because it caused real problems in our application (with locking in unexpected moments and places).
> I'm attaching a test case and a patch that worked for me, but, as usual, causes unknown collateral damage :)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosscache-issues mailing list