You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Ran Tavory <ra...@gmail.com> on 2010/01/11 22:01:51 UTC

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

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?

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

Posted by Ran Tavory <ra...@gmail.com>.
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 <jb...@gmail.com> 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 <ra...@gmail.com> 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?
> >
> >
>

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

Posted by Jonathan Ellis <jb...@gmail.com>.
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 <ra...@gmail.com> 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?
>
>

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

Posted by Ran Tavory <ra...@gmail.com>.
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 <ra...@gmail.com> 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?
>
>
>