[jbosscache-dev] Issue with JBCACHE-1309 WAS: Branch for 2.1.X
Manik Surtani
manik at jboss.org
Fri Apr 4 06:41:18 EDT 2008
On 4 Apr 2008, at 06:47, Brian Stansberry wrote:
> Manik Surtani wrote:
>> On 2 Apr 2008, at 16:20, Brian Stansberry wrote:
>>> Manik Surtani wrote:
>>>
>>>>> < SNIP />
>>>>>
>>>>>>> ......
>>>>>>> org
>>>>>>> .jboss
>>>>>>> .cache
>>>>>>> .invocation
>>>>>>> .CacheInvocationDelegate.put(CacheInvocationDelegate.java:488)
>>>>>>> What's going on here is fetchWorkspaceNode() is walking up the
>>>>>>> tree from /TS/test/org/hibernate/cache/UpdateTimestampsCache/
>>>>>>> Accounts to Fqn.ROOT, calling lockAndCreateWorkspaceNode() on
>>>>>>> each Fqn. When it gets to Fqn.ROOT it fails. This is because
>>>>>>> lockAndCreateWorkspaceNode() wants a write lock on the target
>>>>>>> node before making the workspace copy. In this case the WL
>>>>>>> can't be obtained, because a RL is held by the suspended tx.
>>>>>>> Does lockAndCreateWorkspaceNode() need a write lock here?
>>>>>
>>>>> Probably not. I'm guessing it could do with a RL instead, let
>>>>> me investigate.
>>>> Ok, this is only called when a node exists in the tree and it
>>>> needs to be added to the workspace. In this case, we should only
>>>> attempt to acquire a read lock, not a write lock. The write
>>>> locks are acquired on nodes marked as dirty when a transaction
>>>> commits.
>>>> This fix is in svn (trunk and 2.1.X) and your tests - along with
>>>> other optimistic locking tests - pass. I'm waiting for a full
>>>> Hudson test suite run.
>>>
>>> Excellent; thanks for the quick turn. If all looks well can you
>>> deploy another 2.1.1-SNAPSHOT?. I'll rerun the Hibernate tests
>>> with it.
>> Done.
>
> Ran clean. :-)
>
> Would it irk you terribly if I ported http://jira.jboss.com/jira/browse/JBCACHE-1218
> to 2.1.X in the morning? Configuring an AS CacheManager via a -
> beans.xml is quite ugly compared to the native JBC format. You have
> to uniquely name every pojo in the each config, which is painful
> when you have 7 or 8 different configs. MC has an open JIRA to
> support anonymous beans, but not sure if/when it will get done.
>
> I know it's late to put this in, so I won't be at all bothered if
> you say no. :)
If you think it is sufficiently low-risk and well tested enough (I
think it is), I'd say go ahead and port it.
Cheers,
--
Manik Surtani
Lead, JBoss Cache
manik at jboss.org
More information about the jbosscache-dev
mailing list