The use of “atomic” for batches is misleading. Batches will eventually complete, that doesn’t make them atomic. “All or nothing” is also incorrect, as you can read them in the middle and get “some parts of it”, and without a rollback it’s just “eventually all”.On Sep 29, 2017, at 10:59 AM, DE VITO Dominique <dominique.devito@thalesgroup.
com> wrote:Thanks DuyHai !Does anyone know if BATCH provides atomicity for all mutations of a given partition key for a __single__ table ?Or if BATCH provides atomicity for all mutations of a given partition key for __ALL__ mutated tables into the BATCH ?That is, in case of :BEGIN BATCHUpdate table_1 where PartitionKey_table_1 = 1 … => (A) mutationUpdate table_2 where PartitionKey_table_2 = 1 … => (B) mutationEND BATCHHere, both mutations occur for the same PartitionKey = 1=> are mutations (A) & (B) done in an atomic way (all or nothing) ?Thanks.Dominique[@@ THALES GROUP INTERNAL @@]De : DuyHai Doan [mailto:firstname.lastname@example.org]
Envoyé : vendredi 29 septembre 2017 17:10
À : user
Objet : Re: understanding batch atomicityAll updates here means all mutations == INSERT/UPDATE or DELETEOn Fri, Sep 29, 2017 at 5:07 PM, DE VITO Dominique <dominique.devito@thalesgroup.
com> wrote:Hi,About BATCH, the Apache doc https://cassandra.apache. org/doc/latest/cql/dml.html?says : highlight=atomicity“The BATCH statement group multiple modification statements (insertions/updates and deletions) into a single statement. It serves several purposes:...All updates in a BATCH belonging to a given partition key are performed in isolation”Is “All updates” meaning equivalent to “All modifications (whatever it’s sources: INSERT or UPDATE statements)” ?Or, is “updates” meaning partition-level isolation only for UPDATE statements into the batch (w/o taking into isolation the INSERT other statements into the batch) ?ThanksRegardsDominique