[jboss-jira] [JBoss JIRA] Commented: (JBCACHE-1292) endless loop on concurrent remove

Mircea Markus (JIRA) jira-events at lists.jboss.org
Wed Feb 20 15:24:42 EST 2008


    [ http://jira.jboss.com/jira/browse/JBCACHE-1292?page=comments#action_12400092 ] 
            
Mircea Markus commented on JBCACHE-1292:
----------------------------------------

We can add an timeout check in the loop itself (already implemeted in 2.x)

         {
            do
            {
               //todo -> check for timeout here
               lock(fqn, ctx.getGlobalTransaction(), lock_type, recursive, zeroLockTimeout ? 0 : lock_timeout, createIfNotExists, storeLockedNode);
            }
            while(!cache.exists(fqn)); // keep trying until we have the lock (fixes concurrent remove())
            // terminates successfully, or with (Timeout)Exception
         }

> endless loop on concurrent remove
> ---------------------------------
>
>                 Key: JBCACHE-1292
>                 URL: http://jira.jboss.com/jira/browse/JBCACHE-1292
>             Project: JBoss Cache
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 1.4.1.SP1
>            Reporter: Mircea Markus
>         Assigned To: Manik Surtani
>             Fix For: 1.4.1.GA
>
>         Attachments: ConcurrentPutRemoveTest.java, TestingUtil.java
>
>
> Attached test fails on 1.4.1 SP1 and works on 1.4.0.SP1.
> Issue was introduced in repository version 3089/TreeCache (see code snippet below).
> On trunk this problem does not appear as the code logic is equivalent with the one before repository version 3089.
> Guess the fix would be to change the logic to the one prio 3089, but this needs additional investigation.
> (look for the word FAILURE in code below)
>    private Node findInternal(Fqn fqn, boolean includeNodesMarkedAsRemoved)
>    {
>       if (fqn == null || fqn.size() == 0) return (Node) root;
>       TreeNode n = root;
>       int fqnSize = fqn.size();
>       for (int i = 0; i < fqnSize; i++)
>       {
>          Object obj = fqn.get(i);
>          n = n.getChild(obj);
>          if (n == null)
>             return null;
>          else if (!includeNodesMarkedAsRemoved && ((DataNode) n).isMarkedForRemoval())//FAILURE!!!! this condition was not present in 1.4.0SP1, removing it makes the test pass
>             return null;
>       }
>       return (Node) n;
>    }

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

        



More information about the jboss-jira mailing list