[jbosscache-issues] [JBoss JIRA] Commented: (JBCACHE-1410) Cache loaders that use StripedLock do not adequately lock root node when the root node is first added.

Manik Surtani (JIRA) jira-events at lists.jboss.org
Tue Sep 23 07:29:31 EDT 2008


    [ https://jira.jboss.org/jira/browse/JBCACHE-1410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12430761#action_12430761 ] 

Manik Surtani commented on JBCACHE-1410:
----------------------------------------

Very hard to recreate or unit test as the timing is subtle, but this is a problem.  Managed to reproduce by introducing a barrier in the JDBCCacheLoader.addNewSubtree() method to wiat for > 1 thread hitting this code, and true enough it does happen.

Since put() essentially gets a striped lock for the Fqn being written to and not any parent nodes (since we don't know if any of the parents need creation at this stage) the correct solution should be to get a write lock for the node being inserted in addNewSubtree().

> Cache loaders that use StripedLock do not adequately lock root node when the root node is first added.
> ------------------------------------------------------------------------------------------------------
>
>                 Key: JBCACHE-1410
>                 URL: https://jira.jboss.org/jira/browse/JBCACHE-1410
>             Project: JBoss Cache
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Cache loaders
>    Affects Versions: 2.0.0.GA
>            Reporter: Manik Surtani
>            Assignee: Manik Surtani
>             Fix For: 3.0.0.GA, 2.X
>
>
> See detail on the forum post.

-- 
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