This content has been marked as final.
Show 2 replies
-
1. Re: Locking parent nodes even with lockParentForChildInsertR
manik Oct 12, 2009 8:43 AM (in response to tknyziak)Have you tried 3.2.1? There were some issues with certain context flags not being picked up by the MVCCNodeHelper which were fixed in 3.2.1.
-
2. Re: Locking parent nodes even with lockParentForChildInsertR
tknyziak Oct 16, 2009 7:35 AM (in response to tknyziak)Sorry for not replying for so long.
I've tried replacing 3.2.0 with 3.2.1 and it didn't help - still, as can be seen on the stack trace, parent nodes get being locked for writing:org.jboss.cache.lock.TimeoutException: Unable to acquire lock on Fqn [/node_name] after [1100] milliseconds for requestor [Thread[RMI TCP Connection(46)-192.168.251.104,5,RMI Runtime]]! Lock held by [Thread[RMI TCP Connection(41)-192.168.251.104,5,RMI Runtime]] at org.jboss.cache.mvcc.MVCCNodeHelper.acquireLock(MVCCNodeHelper.java:159) at org.jboss.cache.mvcc.MVCCNodeHelper.wrapNodeForWriting(MVCCNodeHelper.java:236) at org.jboss.cache.mvcc.MVCCNodeHelper.wrapNodeForWriting(MVCCNodeHelper.java:186) at org.jboss.cache.mvcc.MVCCNodeHelper.wrapNodeForWriting(MVCCNodeHelper.java:226) at org.jboss.cache.mvcc.MVCCNodeHelper.wrapNodeForWriting(MVCCNodeHelper.java:186) at org.jboss.cache.mvcc.MVCCNodeHelper.wrapNodeForWriting(MVCCNodeHelper.java:226) at org.jboss.cache.mvcc.MVCCNodeHelper.wrapNodeForWriting(MVCCNodeHelper.java:186) at org.jboss.cache.mvcc.MVCCNodeHelper.wrapNodeForWriting(MVCCNodeHelper.java:226) at org.jboss.cache.mvcc.MVCCNodeHelper.wrapNodeForWriting(MVCCNodeHelper.java:186) at org.jboss.cache.interceptors.MVCCLockingInterceptor.handlePutDataMapCommand(MVCCLockingInterceptor.java:94)
I don't understand why all parent nodes need to be write-locked - [I assume the direct parent of the inserted node might be locked so a new child information can be updated] - but seems like their absence in the InvocationContext causes a cache-wide lock until they're actually read into it (createdIfAbsent, if you will). Sure I can bump up the timeout, but I suppose it's a work-around rather than a real solution.
Any thoughts?
Kind regards