On Mon, Feb 22, 2016 at 3:58 PM, Yawei Li <yawei...@gmail.com> wrote:
> > 1. If an atomic batch (logged batch) contains a bunch of row mutations > and all of them have the same partition key, can I assume all those changes > have the same isolation as the row-level isolation? According to the post > here http://www.mail-archive.com/user%40cassandra.apache.org/msg42434.html, > it seems that we can get strong isolation. > e.g. > *BEGIN BATCH* > * UPDATE a IF condition_1;* > * INSERT b;* > * INSERT c;* > *APPLY BATCH* > > So at any replica, we expect isolation for the three changes on *a*, *b*, > *c* (*a* , *b*, *c* have the same partition key *k1*) -- i.e. either > none or all of them are visible. Can someone help confirm? > That is correct. > > 2. Say in the above batch, we include two extra row mutations d and e for > another partition key *k2*. Will the changes on (*a*, *b*, *c*) and (*d* > , *e*) still atomic respectively in terms of isolation? I understand > there is no isolation between (*a*, *b*, *c*) and (*d*, *e*). I.e. is > there a per-parition-key isolation guaranteed? > You can't use LWT conditions (i.e. "IF condition_1") in batches that span multiple partitions keys. If you did not include the condition, then you would get per-partition isolation, as you describe. > > > 3. I assume CL SERIAL or LOCAL_SERIAL on reads will try applying the above > logged batch if it is committed but not applied. Right? > Correct. -- Tyler Hobbs DataStax <http://datastax.com/>