[infinispan-dev] Undesired behavior

Pedro Ruivo pruivo at gsd.inesc-id.pt
Fri Mar 30 06:26:16 EDT 2012



On 3/30/12 11:17 AM, Mircea Markus wrote:
> On 30 Mar 2012, at 10:47, Pedro Ruivo wrote:
>
>> With the optimistic locking scheme, I think I can use the same approach.
>> The locks are only acquired in the prepare phase, so I can discard the
>> prepare message, right?
> yes.
>> But if the pessimist locking scheme is in use?
>>
>> One possible solution is, If rollback is delivered first, the
>> TxInterceptor skips the write commands replays and in
>> PessimistLockingInterceptor, invoke the lock.unlockAll(ctx) method.
> so during the rollback you release the resources (locks, changes) but keep the tx in the tx table as you know you need to also receive a prepare. When prepare is received the tx would be simply removed from the tx table without any further work. That should work.
OK
>> What do you think?
>>
>> Another issue is where I can implement this behavior? I mean, in TO,
>> this behavior is implemented in TotalOrderInterceptor a
> Do you want to implement TO for pessimistic transactions? I always thought about total order as only being practical for optimistic tx.
>
No I don't want pessimistic tx in TO. I was not very clear but I am 
worry about the code will be duplicated when TO will be merged (assuming 
that you want this solution in your 2PC scheme) :)
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev


More information about the infinispan-dev mailing list