You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Mukil Kesavan <we...@gmail.com> on 2015/12/17 01:08:18 UTC

Are write-write conflicts possible in Cassandra atomic batches when updating multiple tables?

Hello,

The documentation on atomic batches says:

"For example, there is no batch isolation. Clients are able to read the
first updated rows from the batch, while other rows are still being updated
on the server."

However does a write-write conflict scenario arise when I'm updating a
column in two different tables as part of a batch?

Reference: https://en.wikipedia.org/wiki/Write%E2%80%93write_conflict

For example:

Batch 1: Table1.column = x, Table2.column = x

Batch 2: Table1.column = y, Table2.column = y

Result (write-write conflict case): Table1.column = x, Table2.column = y

Thanks!

Re: Are write-write conflicts possible in Cassandra atomic batches when updating multiple tables?

Posted by Carlos Alonso <in...@mrcalonso.com>.
Hi Mukil.

As batches aren't isolated, I think write conflicts are effectively
possible unless, somehow, you prevent them with LWT.

Carlos Alonso | Software Engineer | @calonso <https://twitter.com/calonso>

On 17 December 2015 at 00:08, Mukil Kesavan <we...@gmail.com>
wrote:

> Hello,
>
> The documentation on atomic batches says:
>
> "For example, there is no batch isolation. Clients are able to read the
> first updated rows from the batch, while other rows are still being updated
> on the server."
>
> However does a write-write conflict scenario arise when I'm updating a
> column in two different tables as part of a batch?
>
> Reference: https://en.wikipedia.org/wiki/Write%E2%80%93write_conflict
>
> For example:
>
> Batch 1: Table1.column = x, Table2.column = x
>
> Batch 2: Table1.column = y, Table2.column = y
>
> Result (write-write conflict case): Table1.column = x, Table2.column = y
>
> Thanks!
>