Cassandra guarantees reads and writes to be atomic within a single ColumnFamily.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Cassandra guarantees reads and writes to be atomic within a single ColumnFamily.

Ran Tavory
The front page http://incubator.apache.org/cassandra/ states that "Cassandra guarantees reads and writes to be atomic within a single ColumnFamily."
What exactly does that mean, and where can I learn more about this?
It sounds like it means that batch_insert() and batch_mutate() for two different rows but in the same CF is atomic. Is this correct?


Reply | Threaded
Open this post in threaded view
|

Re: Cassandra guarantees reads and writes to be atomic within a single ColumnFamily.

Ran Tavory
I've posted the question on stackoverflow http://stackoverflow.com/questions/2055037/cassandra-atomic-reads-writes-within-a-single-columnfamily

Anyone has the answer?

Cassandra's front page http://incubator.apache.org/cassandra/ states that:

Cassandra guarantees reads and writes to be atomic within a single ColumnFamily.

What exactly does that mean?
It sounds like it means that batch_insert() and batch_mutate() of two different rows, in the same CF is atomic and if the operation on one of the rows fails, the whole operation fails. but it sounds too good to be true... Is this correct?


On Mon, Jan 11, 2010 at 11:01 PM, Ran Tavory <[hidden email]> wrote:
The front page http://incubator.apache.org/cassandra/ states that "Cassandra guarantees reads and writes to be atomic within a single ColumnFamily."
What exactly does that mean, and where can I learn more about this?
It sounds like it means that batch_insert() and batch_mutate() for two different rows but in the same CF is atomic. Is this correct?



Reply | Threaded
Open this post in threaded view
|

Re: Cassandra guarantees reads and writes to be atomic within a single ColumnFamily.

Jonathan Ellis-3
In reply to this post by Ran Tavory
It's correct, if understood correctly.  We should probably just remove
it since it's confusing as written.

What it means is, if a write for a given row is acked, eventually,
_all_ the data updated _in that row_ will be available for reads.  So
no, it's not atomic at the batch_mutate level but at the
list<ColumnOrSuperColumn> level.

-Jonathan

On Mon, Jan 11, 2010 at 3:01 PM, Ran Tavory <[hidden email]> wrote:
> The front page http://incubator.apache.org/cassandra/ states that "Cassandra
> guarantees reads and writes to be atomic within a single ColumnFamily."
> What exactly does that mean, and where can I learn more about this?
> It sounds like it means that batch_insert() and batch_mutate() for two
> different rows but in the same CF is atomic. Is this correct?
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Cassandra guarantees reads and writes to be atomic within a single ColumnFamily.

Ran Tavory
Thanks, so maybe to rephrase:

Cassandra guarantees reads and writes to be atomic within a single row.

But this isn't saying much... so maybe just take it off...


On Thu, Jan 14, 2010 at 12:40 AM, Jonathan Ellis <[hidden email]> wrote:
It's correct, if understood correctly.  We should probably just remove
it since it's confusing as written.

What it means is, if a write for a given row is acked, eventually,
_all_ the data updated _in that row_ will be available for reads.  So
no, it's not atomic at the batch_mutate level but at the
list<ColumnOrSuperColumn> level.

-Jonathan

On Mon, Jan 11, 2010 at 3:01 PM, Ran Tavory <[hidden email]> wrote:
> The front page http://incubator.apache.org/cassandra/ states that "Cassandra
> guarantees reads and writes to be atomic within a single ColumnFamily."
> What exactly does that mean, and where can I learn more about this?
> It sounds like it means that batch_insert() and batch_mutate() for two
> different rows but in the same CF is atomic. Is this correct?
>
>