We should probably replace "atomic" by "aut= omatic retry" because it reflects exactly the actual guarantees
<= div class=3D"gmail_extra">
On Fri, Sep 29, 20= 17 at 6:10 PM, Jon Haddad wrote:
The use= of =E2=80=9Catomic=E2=80=9D for batches is misleading.=C2=A0 Batches will = eventually complete, that doesn=E2=80=99t make them atomic. =C2=A0=E2=80=9C= All or nothing=E2=80=9D is also incorrect, as you can read them in the midd= le and get =E2=80=9Csome parts of it=E2=80=9D, and without a rollback it=E2= =80=99s just =E2=80=9Ceventually all=E2=80=9D.
=

On Sep 29, 2017, at = 10:59 AM, DE VITO Dominique <dominique.devito@thalesgroup.com> wr= ote:

Thanks DuyHai=C2=A0!
=C2=A0
Does anyone know if BATCH provides atom= icity for all mutations of a given partition key for a __single__ table ?=C2=A0<= /u>
= =C2=A0
Or if= BATCH provides atomicity for all mutations of a given partition key for __= ALL__ mutated tables into the BATCH ?
=C2=A0
That is, in case of :
=C2=A0
BEGIN BATCH=C2=A0
Upd= ate table_1 where PartitionKey_table_1 =3D 1 =E2=80=A6=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D> (A) mutation=
= Update table_2 where PartitionKey_table_2 =3D 1 =E2=80=A6=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D> (B) mutation=
END BATCH
=C2=A0
Here, both mutations occur for the same PartitionKey =3D 1<= /u>
=3D> = are mutations (A) & (B) done in an atomic way (all or nothing) ?=
=C2= =A0
Thanks.<= u>
=C2=A0
Dom= inique
=C2=A0=
=C2=A0
=C2=A0
[@@ THALES GROUP INTERNAL @@]
=C2=A0
De=C2=A0:<= /span>=C2=A0DuyHai= Doan [mailto:doanduyhai@gmail.com]=C2=A0
Envoy=C3=A9=C2=A0:=C2=A0vendredi 29 septembre 2017 17:10
=C3=80=C2=A0:=C2=A0= user
Objet=C2=A0:=C2=A0Re: understanding batch atomicity
=C2=A0
All updates here means all mutations =3D=3D INSERT/UPDATE or D= ELETE
=C2=A0
=C2=A0
=C2=A0
On Fri, Sep 29, 2017 at 5:07 PM, DE VITO Dominique <dominique.devito@thalesgroup.com&g= t; wrote:
Hi,
=C2=A0
About BATCH, the Apache = doc=C2=A0https://cassandra.apache.org/doc/late= st/cql/dml.html?highlight=3Datomicity=C2=A0says=C2=A0:
<= span lang=3D"EN-US" style=3D"font-family:Arial,sans-serif">=C2=A0=
=E2=80=9CThe BATCH statement group mul= tiple modification statements (insertions/updates and deletions) into a sin= gle statement. It serves several purposes:
...
All upd= ates in a BATCH belonging to a given partition key are performed in isolati= on= =E2=80=9D
=C2=A0
Is =E2=80=9CAll=C2=A0updates=E2=80=9D meaning equivalent to =E2=80= =9CAll modifications (whatever it=E2=80=99s sources: INSERT or UPDATE state= ments)=E2=80=9D ?
=C2=A0=
Or, is =E2=80=9Cupdates=E2=80=9D meaning partition= -level isolation=C2=A0only=C2=A0for UPDATE statements into the batch (w/o taking int= o isolation the INSERT other statements into the batch) ?<= /u>
=C2=A0
Thanks<= /u>
=C2=A0
Regards<= /u>
Dominique

--94eb2c0887b6a81239055a564e8b--