-
1. Re: Write skew semantics
galder.zamarreno Mar 21, 2012 9:56 AM (in response to jeremystone)Jeremy, thx very much for providing a unit test for this. It makes it easier for us to evaluate why it fails. We'll reply asap.
-
2. Re: Write skew semantics
galder.zamarreno Mar 21, 2012 11:48 AM (in response to galder.zamarreno)Jeremy, I'm assuming that the test works fine for you but it should fail?
I've just run it locally and it fails indicating that it detects a write skew.
Your ported over test: https://github.com/galderz/infinispan/commit/94bdd9c2fbc3ac1e6d3af2889208293fed147e40
Failure: https://gist.github.com/2148786
-
3. Re: Write skew semantics
jeremystone Mar 21, 2012 12:07 PM (in response to galder.zamarreno)The test _fails_ for me also.
The same assertion at line 101 fails. Meaning that 'result' is false for the thread so that at least one uniqueValuesSet.add(value) returned false (an attempt to add a duplicate value) for some value = v (say).
This indicates to me that it did not detect a write skew: i.e. both threads read the counter as v - 1, incremented it to v and successfully place it back into the cache. Instead I would expect one thread to throw an exception (on either the put or the commit).
-
4. Re: Write skew semantics
galder.zamarreno Mar 23, 2012 7:02 AM (in response to jeremystone)1 of 1 people found this helpfulJeremy, I've had a good look at the test and in some cases, write skew is detected sometimes (see logs) but most often it's not, so I think this is a bug.
I've created https://issues.jboss.org/browse/ISPN-1941 to get this solved.
-
5. Re: Write skew semantics
jeremystone Mar 23, 2012 7:05 AM (in response to galder.zamarreno)Many thanks Galder.