I think I have spotted a problem with the write skew check implementation based on versioning.

I've made this test to confirm:

I have a global counter that is incremented concurrently by two different nodes, running ISPN with Repeatable Read with write skew enabled. I expected that each successfully transaction will commit a different value.

In detail, each node do the following:

beginTx

Integer count = cache.get("counter");

count = count + 1;

cache.put("counter", count)

commitTx

To avoid errors, I've run this test on two ISPN versions: 5.1.0.CR4 and 5.0.1.Final. In 5.0.1.Final, it works as expected. However, on 5.1.0.CR4 I have a lot of repeated values. After a first check at the code, I've the impression that the problem may be due to that the version numbers of the keys for which the write skew check should be run is not sent with the prepare command.