You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Attila Wind <at...@swf.technology> on 2020/06/26 06:06:55 UTC

relation btw LWTs and RF

Hey guys,

Recently I ran into an interesting situation (by trying to add 
optimistic locking strategy to one of the tables)
Which lead me eventually to the following observation. Can you confirm 
(or argue) this is correct when I am saying:

"It is not possible to use conditional queries with ReplicationFactor = 
2 with tolerating 1 node is down (out of that 2 replicas)"

?

Thanks!

-- 
Attila Wind

http://www.linkedin.com/in/attilaw
Mobile: +49 176 43556932



Re: relation btw LWTs and RF

Posted by Attila Wind <at...@swf.technology>.
Ah yeah forgot to mention - I am using Cassandra 4.0-alpha4

Attila Wind

http://www.linkedin.com/in/attilaw
Mobile: +49 176 43556932


26.06.2020 08:06 keltezéssel, Attila Wind írta:
>
> Hey guys,
>
> Recently I ran into an interesting situation (by trying to add 
> optimistic locking strategy to one of the tables)
> Which lead me eventually to the following observation. Can you confirm 
> (or argue) this is correct when I am saying:
>
> "It is not possible to use conditional queries with ReplicationFactor 
> = 2 with tolerating 1 node is down (out of that 2 replicas)"
>
> ?
>
> Thanks!
>
> -- 
> Attila Wind
>
> http://www.linkedin.com/in/attilaw
> Mobile: +49 176 43556932
>
>

Re: relation btw LWTs and RF

Posted by Attila Wind <at...@swf.technology>.
Thank you!

The 2nd link you sent is very very good description! I recommend for 
others too (who might run into this question via mail archive search 
later...)

In my opinion it explains the entire problem space regarding how LWTs 
are working while also putting them into the context of "consistency 
level" / different phases of LWT very well.
Yesterday I was searching / reading at least 15 different articles + 
docs - none of them answered my questions (and I just had more and more 
as progressing with reading) entirely - this one is a nice one!

cheers

Attila Wind

http://www.linkedin.com/in/attilaw
Mobile: +49 176 43556932


26.06.2020 08:15 keltezéssel, Erick Ramirez írta:
> You are correct. Lightweight transactions perform a read-before-write 
> [1]. The read phase is performed with a serial consistency which 
> requires a quorum of nodes in the local DC (LOCAL_SERIAL) or across 
> the whole cluster (SERIAL) [2].
>
> Quorum of 2 nodes is 2 nodes so RF=2 cannot tolerate a node outage. 
> Cheers!
>
> [1] 
> https://www.datastax.com/blog/2019/04/lightweight-transactions-datastax-enterprise
> [2] 
> https://docs.datastax.com/en/cassandra-oss/3.x/cassandra/dml/dmlConfigConsistency.html#dmlConfigConsistency__table-write-consistency


Re: relation btw LWTs and RF

Posted by Erick Ramirez <er...@datastax.com>.
You are correct. Lightweight transactions perform a read-before-write [1].
The read phase is performed with a serial consistency which requires a
quorum of nodes in the local DC (LOCAL_SERIAL) or across the whole cluster (
SERIAL) [2].

Quorum of 2 nodes is 2 nodes so RF=2 cannot tolerate a node outage. Cheers!

[1]
https://www.datastax.com/blog/2019/04/lightweight-transactions-datastax-enterprise
[2]
https://docs.datastax.com/en/cassandra-oss/3.x/cassandra/dml/dmlConfigConsistency.html#dmlConfigConsistency__table-write-consistency