cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Ellis <>
Subject Re: Mutations during selects
Date Fri, 09 Sep 2011 17:33:29 GMT
Consider this scenario in a SQL database:

UPDATE foo SET x = 1 WHERE key = 'asdf';

Now, "simultaneously," two clients run

UPDATE foo SET x = 2 WHERE key = 'asdf';
SELECT * FROM foo WHERE x = 1;

Either you get back row asdf, or you don't.  Either is valid.  Same
thing happens with Cassandra indexes.

On Fri, Sep 9, 2011 at 10:41 AM,  <> wrote:
> I see that Cassandra updates secondary indices as soon as a value of the
> indexed column is updated. This can happen, for example, during a select
> query with a condition on a secondary index. Does Cassandra perform no
> checking or locking? Will the result of this select, with old and new
> values, be returned as is? Am I missing some reason why this isn't a
> problem?
> Alexander

Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support

View raw message