<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Hi,<br>
<br>
I think that the Total Order has the same behavior as a 2PC with
<sync> and with flag <code></code>syncCommitPhase=false
(where the prepare command is sent synchronous and the commit
command is sent asynchronous).<br>
<br>
That failed test can be solved in a easy way: check if
syncCommitPhase==true then wait for all ACKs (send the prepare in a
synchronous way). This way, you have the guarantee that everybody
saw and applied the modifications.<br>
<br>
Cheers,<br>
Pedro<br>
<br>
On 3/7/12 1:44 AM, Mircea Markus wrote:
<blockquote
cite="mid:74305964-12fc-41a8-854a-15270b1868db@zmail13.collab.prod.int.phx2.redhat.com"
type="cite">
<pre wrap="">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
<a class="moz-txt-link-freetext" href="http://www.infinispan.org">http://www.infinispan.org</a>
_______________________________________________
infinispan-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/infinispan-dev">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a>
</pre>
</blockquote>
</body>
</html>