incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From graham sanderson <gra...@vast.com>
Subject Re: Consistency Level One Question
Date Fri, 21 Feb 2014 06:47:08 GMT
Writing at a consistency level of ONE means that your write will be acknowledged as soon as
one replica confirms that it has made the write to memtable and the commit log (might not
be quite synced to disk, but that’s a separate issue).
All the writes are submitted in parallel, so it is very possible that the data will be on
the other nodes very quickly

Reading at ONE means that only one node will be asked for the data (unless you have rapid-read-protection
AND the node you asked is very slow to respond).

So writing/reading at ONE means that it is possible (depending on how long you wait and a
bunch of other factors) that the read - if it goes to another replica - *may* not return the
data.

The safest thing to do is QUORUM writes and reads - this way the write only is acknowledged
when 2 of the 3 replicas have confirmed the data is written; subsequently your read will go
to at least 2 nodes, at least one of which must therefore have the latest data, and the read
command returns the most up to date data amongst the responding nodes.

On Feb 20, 2014, at 11:21 PM, Drew Kutcharian <drew@venarc.com> wrote:

> Hi Guys,
> 
> I wanted to get some clarification on what happens when you write and read at consistency
level 1. Say I have a keyspace with replication factor of 3 and a table which will contain
write-once/read-only wide rows. If I write at consistency level 1 and the write happens on
node A and I read back at consistency level 1 from another node other than A, say B, will
C* return “not found” or will it trigger a read-repair before responding? In addition,
what’s the best consistency level for reading/writing write-once/read-only wide rows?
> 
> Thanks,
> 
> Drew
> 


Mime
View raw message