[infinispan-dev] Readonly tx leak fix causing issues with Hibernate 2LC use case

Galder Zamarreño galder at redhat.com
Mon Jan 24 04:36:32 EST 2011


On Jan 21, 2011, at 6:15 PM, Mircea Markus wrote:

> 
> On 21 Jan 2011, at 16:34, Galder Zamarreño wrote:
> 
>> Hi,
>> 
>> Re: https://issues.jboss.org/browse/ISPN-845
>> 
>> This is causing issues with use cases such as the Hibernate 2LC. Imagine this scenario:
>> 
>> tx.begin();
>> cache1.get();
>> cache2.put();
>> cache3.remove();
>> tx.commit();
>> 
>> At commit time, 3 prepares are generated of which, the 1st prepare is marked as readonly (no mods made on cache1), so that prepare is committed in advance.
>> 
>> Now, when tx.commit() is called it fails cos the first tx for cache1 has already been committed.
> I guess this is because the XAResource doesn't find the tx in the transaction table. I guess the way to go is to delist it after committing, let me ping Jonathan to see :)
>         if (trace) log.trace("no tx found for {0}", xid);
>         throw new XAException(XAException.XAER_NOTA);
> 

Precisely, I get "no tx found..."

>> 
>> There's a test that simulates this kind of scenario in Infinispan 2LC testsuite.
>> 
>> A different solution is needed and seems like this was discussed this week in Newcastle? (https://issues.jboss.org/browse/ISPN-887)
>> 
>> Cheers,
>> --
>> Galder Zamarreño
>> Sr. Software Engineer
>> Infinispan, JBoss Cache
>> 
>> 
>> _______________________________________________
>> infinispan-dev mailing list
>> infinispan-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
> 
> 
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache




More information about the infinispan-dev mailing list