cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Anastasyev <>
Subject Re: Basic question on a write operation immediately followed by a read
Date Tue, 25 Jan 2011 07:32:43 GMT
> Is there a possibility that my read operation may miss the data that just got

If write operation did not resulted in exception and there was no other clients
writing to the same row/column concurrently - you will read exactly what you
just written.
> Since there are no DB transactions in Cassandra, are writes immediately seen
to readers - even partially as they get written? 

Writes are atomic on column level. So concurrently reading client could not read
partially written column, but, in case of multicolumn batch insert, concurrent
readers may see not all columns of batch written.

> Or can there be a delay sometimes due to flusing-to-SSTables, etc? 


> Or, the writes are first in-memory and immediately visible to readers and
flusing, etc is independent of all this and happens in background?

Exactly. All writes are first go to memtable, which is in-memory structure.
Reads of just written data are served from memory. All flushing, compactions,
repair, cluster management tasks are served by background threads.

View raw message