On Thu, Apr 19, 2018 at 11:13 AM Rajesh Kishore <rajesh10si...@gmail.com>
wrote:

> Thanks for the response. Let me put my question again wrt a example
>
> I want to perform a atomic txn say insert/delete/update on a set of tables
> TableA
> TableB
> TableC
>
> When these are performed as batch operations and let us say something goes
> wrong while doing operation at TableC
> Would the system rollback the operations done for TableA TableB ?
>

No, batch have no rollback whatsoever.

Batch[1] use a distributed log however which make it so that the operation
on TableC will be retried internally until it
succeeds, so the guarantee you do get is that if some operations of a batch
are applied, then all of them will
*eventually* get applied. There is no isolation however, and you can very
well observer a state where you can read
the operations on TableA and TableB without seeing the ones on TableC
because they haven't been retried yet.


> -Rajesh
>
>
>
> On Thu, Apr 19, 2018 at 1:25 PM, Jacques-Henri Berthemet <
> jacques-henri.berthe...@genesys.com> wrote:
>
>> Cassandra support LWT (Lightweight transactions), you may find this doc
>> interesting:
>>
>>
>> https://docs.datastax.com/en/cassandra/3.0/cassandra/dml/dmlDataConsistencyTOC.html
>>
>>
>>
>> In any case, LWT or BATCH you won’t have external control on the tx, it’s
>> either done or not done. In case of timeout you won’t have a way to know
>> if it worked or not.
>>
>> There is no way to rollback a statement/batch, the only way is to send an
>> update to modify the partition to its previous state.
>>
>>
>>
>> Regards,
>>
>> *--*
>>
>> *Jacques-Henri Berthemet*
>>
>>
>>
>> *From:* DuyHai Doan [mailto:doanduy...@gmail.com]
>> *Sent:* Thursday, April 19, 2018 9:10 AM
>> *To:* user <user@cassandra.apache.org>
>> *Subject:* Re: Does Cassandra supports ACID txn
>>
>>
>>
>> No ACID transaction any soon in Cassandra
>>
>>
>>
>> On Thu, Apr 19, 2018 at 7:35 AM, Rajesh Kishore <rajesh10si...@gmail.com>
>> wrote:
>>
>> Hi,
>>
>> I am bit confused by reading different articles, does recent version of
>> Cassandra supports ACID transaction ?
>>
>> I found BATCH command , but not sure if it supports rollback, consider
>> that transaction I am going to perform would be on single partition.
>>
>> Also, what are the limitations if any?
>>
>>
>>
>> Thanks,
>>
>> Rajesh
>>
>>
>>
>
>

Reply via email to