[jbosscache-dev] GravitateDataCommand finds invalid "phantom" nodes

Brian Stansberry brian.stansberry at redhat.com
Fri Aug 7 10:23:53 EDT 2009


Manik Surtani wrote:
> 
> On 7 Aug 2009, at 10:18, Manik Surtani wrote:
> 
>> Thanks for the patch; that makes a lot of sense.  Go ahead and check
>> it in to trunk.
>>
>> Regarding the creation of nodes for deletion, well that's pessimistic
>> locking for you.  Unfortunately the lock is encapsulated in the node
>> so you can't acquire the lock until the node is created.  (Which is
>> partially why the pessimistic lock design sucks).
>>
>> This is created in PessimisticNodeBasedLockManager (line 145).  At
>> this stage we already know if we are just creating a dummy node for
>> deletion, so perhaps we could pass this as a flag into the constructor
>> of a PessimisticUnversionedNode, and this could acquire the lock on
>> creation.  Hmm, need to think about this.
> 
> Right, so I have created a patch for this - it isn't the prettiest in 
> that it exposes some PessimisticUnversionedNode internals to the 
> PessimisticNodeBasedLockManager, but these two (deprecated) classes are 
> so tightly coupled anyway that if this fixes the race then I'm happy to 
> go with it.
> 
> Just as an FYI, this is checked in as rev. 8167.
> 

Great; thanks! Rado is doing some reconfig of his test setup; once 
that's done he'll run the tests with a build of your latest.


-- 
Brian Stansberry
Lead, AS Clustering
JBoss by Red Hat


More information about the jbosscache-dev mailing list