[infinispan-dev] An observation about total order and consistency
Mircea Markus
mmarkus at redhat.com
Tue Mar 6 20:44:56 EST 2012
With total order and sync replication it is possible for the following:
tm.begin()
cache(0).put(k,v);
tm.commit();
assert cache(0).get(k).equals(v); //always passes
assert cache(1).get(k).equals(v); //might fail!
//..but
eventually(cache(1).get(k).equals(v)) //this will always pass
In other words, after a transaction is completed, you are only guaranteed to see its results on the originator node. On replicas the value is only eventually made available.
Whilst this is fine for embedded caches, as in practice the replication would happen between different JVMs, this is still relevant for:
- hotrod: a client might tx-write on a node and read from the other
- tests
Cheers
Mircea
--
Mircea Markus
twitter.com/mirceamarkus
Sr. Software Engineer, Infinispan
http://www.infinispan.org
More information about the infinispan-dev
mailing list