[infinispan-dev] Implicit locking
Manik Surtani
manik at jboss.org
Mon May 25 15:02:43 EDT 2009
On 25 May 2009, at 12:37, Vladimir Blagojevic wrote:
> Had a bit more discussion on this topic with Mircea and I wanted to
> get your possible input. I can foresee two ways we can implement
> this feature. First, in CacheDelegate for each write command we
> simply invoke lock in case operation is done within transactional
> context and eager locking is on. Second, Mircea suggested to
> augment TxInterceptor (probably within shouldEnlist branch of
> enlistWriteAndInvokeNext method) where we create LockControlCommand
> and send it down the stack prior to sending intercepted write
> command down the stack.
I think putting this in the TxInterceptor makes sense since it only
affects writes within a tx. Perhaps subclassing the TxInterceptor to
do this?
> Another requirement is not to repeatedly send LCC command around the
> cluster for write operation that already caused locks to be obtained
> eagerly around the cluster. I think this requirement can be handled
> within LockInterceptor#visitLockControlCommand thus hiding the
> complexity away from possible invocation of LockControlCommand from
> either CacheDelegate or TxInterceptor.
Hmm, good point. Maybe then it does make more sense to put it in the
LockingInterceptor.
> WDYT?
>
> Cheers,
> Vladimir
>
> On 5/25/09 9:02 AM, Vladimir Blagojevic wrote:
>> Hey,
>>
>> I want to start working on [1]. Which operations do we want to
>> include into transparent implicit eager locking? All operations
>> that are WriteCommand(s)?
>>
>> I want to add boolean attribute useEagerLocking in transaction
>> configuration element. If you object to this name, speak up!
+1 to this. Please update the config XSD, parser tests and the sample
all.xml file accordingly.
Cheers,
--
Manik Surtani
manik at jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org
More information about the infinispan-dev
mailing list