[jbosscache-issues] [JBoss JIRA] Commented: (JBCACHE-1479) Loads nodes from cache loader too aggresively

Manik Surtani (JIRA) jira-events at lists.jboss.org
Wed Feb 18 05:11:44 EST 2009


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

Manik Surtani commented on JBCACHE-1479:
----------------------------------------

Thanks for this, I have worked the test into the test suite and am testing a fix right now.  This will make it into 3.0.3.GA.

> Loads nodes from cache loader too aggresively
> ---------------------------------------------
>
>                 Key: JBCACHE-1479
>                 URL: https://jira.jboss.org/jira/browse/JBCACHE-1479
>             Project: JBoss Cache
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Cache loaders, Transactions
>    Affects Versions: 3.0.2.GA, 3.1.0.GA
>            Reporter: Krzysztof Sobolewski
>            Assignee: Manik Surtani
>             Fix For: 3.0.3.GA
>
>         Attachments: ConcurrentReadsDeadlockTest.java, ConcurrentReadsDeadlockTest.java
>
>
> I have a test that goes like this (all in the same thread):
> 0. populate cache with a single node, via a simple put().
> 1a. start transaction 1 (and suspend)
> 1b. start transaction 2 (and suspend)
> 2a. resume tx1
> 2b. get the node
> 2c. suspend tx1
> 3a. resume tx2
> 3b. get the node
> 3c. suspend tx2
> 4. resume and end both transactions
> With 2.2 it works fine. With 3.x (3.0.2 and trunk) it timeouts on step 3b. The problem is that even though the node was added by me and was not evicted, the CacheLoaderInterceptor tries to load it for both transactions (steps 2b and 3b). This entails a write lock, hence a deadlock. From what I gather this is because the "data loaded" flag is never set on the node and it confuses the interceptor, which tries to load (and puts a write lock) on each and every access. My guess is that the flag should be set to true after put() -- if I do it "by hand", there is no deadlock (but then some other test fails, which means that I'm not qualified to fix this problem :) )

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