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

Galder Zamarreño galder at redhat.com
Wed Jan 26 10:53:23 EST 2011


Yeah, that was precisely the problem. I discussed with Mircea and he clarified it for me.

The TM used is a home-grown one that can do XA/synchronization with Hypersonic.

This is now fixed.

On Jan 25, 2011, at 8:40 PM, Manik Surtani wrote:

> Yes, but commit shouldn't get called on a resource that is read-only.
> 
> As Mircea asked, which TM does the Hibernate test suite use?
> 
> On 24 Jan 2011, at 09:36, Galder Zamarreño wrote:
> 
>> 
>> 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
>> 
>> 
>> _______________________________________________
>> infinispan-dev mailing list
>> infinispan-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
> 
> --
> Manik Surtani
> manik at jboss.org
> twitter.com/maniksurtani
> 
> Lead, Infinispan
> http://www.infinispan.org
> 
> 
> 
> 
> _______________________________________________
> 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