14 Replies Latest reply on Mar 6, 2007 2:27 AM by msteiner

    Endless loop in JBoss Cache 1.4.1.GA


      My application works perfect with 1.4.0.SP1 but not with 1.4.1.GA. I have got node " / a / b"
      Everything works fine then I remove (TreeCacheMBean.remove(Fqn root);) then I once again put " / a / b" (TreeCacheMBean.put(Fqn fqn, String key, Object object);) and here problem starts. I have debugged a litle and found problematic place: org.jboss.cache.interceptors.PessimisticLockInterceptor line 170

      if (createIfNotExists)
       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

      cache.exists(fqn) always returns false beause node "a" in fqn " / a / b" has been marked for removal (data={__JBOSS_MARKED_FOR_REMOVAL=null})
      and org.jboss.cache.Node.getOrCreateChild(..) (line 322) does nothing with this node because it only creates new node if children().get(child_name)==null but this node is not null ! it exists and has __JBOSS_MARKED_FOR_REMOVAL flag.

      Why node 'a' is not removed but only marked __JBOSS_MARKED_FOR_REMOVAL?
      It is connected with JBCACHE-871 ?

      My TransactionManager configuration:

      <attribute name="TransactionManagerLookupClass">
      <attribute name="IsolationLevel">NONE</attribute>