Re: [infinispan-dev] Doubts about TxDistributionInterceptor and possible break in transaction isolation

2013-06-18 Thread Dan Berindei
On Mon, Jun 17, 2013 at 7:00 PM, Mircea Markus mmar...@redhat.com wrote: On 17 Jun 2013, at 16:11, Dan Berindei dan.berin...@gmail.com wrote: I think that, given that the local node is not owner, the lock acquisition is redundant even for pessimistic caches. Mind creating a test to

Re: [infinispan-dev] Doubts about TxDistributionInterceptor and possible break in transaction isolation

2013-06-18 Thread Dan Berindei
On Mon, Jun 17, 2013 at 6:35 PM, William Burns mudokon...@gmail.com wrote: On Mon, Jun 17, 2013 at 11:11 AM, Dan Berindei dan.berin...@gmail.comwrote: On Mon, Jun 17, 2013 at 3:58 PM, Pedro Ruivo pe...@infinispan.orgwrote: On 06/17/2013 12:56 PM, Mircea Markus wrote: On 17 Jun

Re: [infinispan-dev] Doubts about TxDistributionInterceptor and possible break in transaction isolation

2013-06-18 Thread William Burns
On Tue, Jun 18, 2013 at 9:23 AM, Dan Berindei dan.berin...@gmail.comwrote: On Mon, Jun 17, 2013 at 6:35 PM, William Burns mudokon...@gmail.comwrote: On Mon, Jun 17, 2013 at 11:11 AM, Dan Berindei dan.berin...@gmail.comwrote: On Mon, Jun 17, 2013 at 3:58 PM, Pedro Ruivo

Re: [infinispan-dev] Doubts about TxDistributionInterceptor and possible break in transaction isolation

2013-06-17 Thread Mircea Markus
On 17 Jun 2013, at 11:52, Pedro Ruivo pe...@infinispan.org wrote: I've been looking at TxDistributionInterceptor and I have a couple of questions (assuming REPEATABLE_READ isolation level): #1. why are we doing a remote get each time we write on a key? (huge perform impact if the key was

Re: [infinispan-dev] Doubts about TxDistributionInterceptor and possible break in transaction isolation

2013-06-17 Thread Pedro Ruivo
On 06/17/2013 12:56 PM, Mircea Markus wrote: On 17 Jun 2013, at 11:52, Pedro Ruivo pe...@infinispan.org wrote: I've been looking at TxDistributionInterceptor and I have a couple of questions (assuming REPEATABLE_READ isolation level): #1. why are we doing a remote get each time we write

Re: [infinispan-dev] Doubts about TxDistributionInterceptor and possible break in transaction isolation

2013-06-17 Thread Mircea Markus
On 17 Jun 2013, at 13:58, Pedro Ruivo pe...@infinispan.org wrote: After this analysis, it is possible to break the isolation between transaction if I do a get on the key that does not exist: tm.begin() cache.get(k) //returns null //in the meanwhile a transaction writes on k and commits

Re: [infinispan-dev] Doubts about TxDistributionInterceptor and possible break in transaction isolation

2013-06-17 Thread Dan Berindei
On Mon, Jun 17, 2013 at 3:58 PM, Pedro Ruivo pe...@infinispan.org wrote: On 06/17/2013 12:56 PM, Mircea Markus wrote: On 17 Jun 2013, at 11:52, Pedro Ruivo pe...@infinispan.org wrote: I've been looking at TxDistributionInterceptor and I have a couple of questions (assuming

Re: [infinispan-dev] Doubts about TxDistributionInterceptor and possible break in transaction isolation

2013-06-17 Thread William Burns
On Mon, Jun 17, 2013 at 11:11 AM, Dan Berindei dan.berin...@gmail.comwrote: On Mon, Jun 17, 2013 at 3:58 PM, Pedro Ruivo pe...@infinispan.org wrote: On 06/17/2013 12:56 PM, Mircea Markus wrote: On 17 Jun 2013, at 11:52, Pedro Ruivo pe...@infinispan.org wrote: I've been looking at

Re: [infinispan-dev] Doubts about TxDistributionInterceptor and possible break in transaction isolation

2013-06-17 Thread Mircea Markus
On 17 Jun 2013, at 16:11, Dan Berindei dan.berin...@gmail.com wrote: I think that, given that the local node is not owner, the lock acquisition is redundant even for pessimistic caches. Mind creating a test to check if dropping that lock acquisition doesn't break things? I created a