[infinispan-dev] rethinking ISPN transactions

Mircea Markus mmarkus at redhat.com
Wed Dec 4 06:24:31 EST 2013


Even if it doesn't fail: the commit is sent async, the get which is sync might be processed before the commit and sees the old data.


On Dec 4, 2013, at 11:09 AM, Mark Little <mlittle at redhat.com> wrote:

> Agreed if fail. Alternatively it could block whilst waiting for the commit to complete.
> 
> Mark.
> 
> 
> On 3 Dec 2013, at 13:58, Mircea Markus wrote:
> 
>>> Data cannot be read until the transaction has completed (one way or another). So I'm not sure what the problem is you're alluding to here.
>> 
>> 
>> store.put(k,v1); //initial value
>> tm.begin()
>> store.put(k,v2);
>> tm.commit();
>> 
>> assert store.get(k).equals(v2); //this might fail with async commits, which for some users would be surprising
> 
> ---
> Mark Little
> mlittle at redhat.com
> 
> JBoss, by Red Hat
> Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom.
> Registered in UK and Wales under Company Registration No. 3798903 Directors: Michael Cunningham (USA), Charlie Peters (USA), Matt Parsons (USA) and Brendan Lane (Ireland).
> 
> 
> 
> 
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

Cheers,
-- 
Mircea Markus
Infinispan lead (www.infinispan.org)







More information about the infinispan-dev mailing list