Depends on the consistency level you are setting on write and read.

What CL are you writing at and what CL are you reading at?

The consistency level tells the coordinator when to send acknowledgement of a 
write and whether to cross DCs to confirm a write. It also tells the 
coordinator how many replicas to read and whether or not to cross  DCs to get 
consensus.

Eg. Local_quorum is different from Quorum.
Local_quorum guarantees Data was saved to a quorum of nodes on the DC on which 
the Coordinator accepted the write. Similarly it would only check nodes in that 
DC. Quorum would check across DCs in the whole cluster.
On May 7, 2019, 12:11 PM -0500, Alexey Knyshev <alexey.knys...@gmail.com>, 
wrote:
> Hi there!
>
> Could someone please explain how Column Family would be replicated and 
> "visible / readable" in the following scenario? Having multiple 
> geo-distributed datacenters with significant latency (up to 100ms RTT). Let's 
> name two of them A and B and consider the following 2 cases:
>
> 1. Cassandra client X inserts row into Column Family (CF) with Primary Key = 
> PK (all cells are set - no nulls possible). Write coordinator is in dc A. All 
> cells in this write should have the same writetime. For simplicity let's 
> assume that Cassandra coordinator node sets writetime. After some amount of 
> time (< RTT) client Y reads whole row (select * ...) from the same CF with 
> same PK talking to coordinator node from, another dc (B). Is it possible that 
> client Y will get some cells as NULLs, I mean, is it possible to read some 
> already replicated cells and for others get NULLs, or does Cassandra 
> guarantee row-level isolation / atomic write for that insert? Assume that row 
> (all cells for same PK will never be updated / deleted afterwards.
> 2. Same as in p.1 but after first write at PK same client (X) updates some 
> columns for the same PK. Will be this update isolated / atomically written 
> and eventually visible in another dc. Will client see isolated state as it 
> was before write or after it?
>
> Thanks in advance!
>
>
> --
> linkedin.com/profile
>
> github.com/alexeyknyshev
> bitbucket.org/alexeyknyshev

Reply via email to