Re: Question about commit consistency level for Lightweight Transactions in Paxos v2

2024-03-11 Thread Weng, Justin via user
So for upgrading Paxos to v2, the non-serial consistency level should be set to 
ANY or LOCAL_QUORUM, and the serial consistency level should still be SERIAL or 
LOCAL_SERIAL. Got it, thanks!

From: Laxmikant Upadhyay 
Date: Tuesday, 12 March 2024 at 7:33 am
To: user@cassandra.apache.org 
Cc: Weng, Justin 
Subject: Re: Question about commit consistency level for Lightweight 
Transactions in Paxos v2
You don't often get email from laxmikant@gmail.com. Learn why this is 
important<https://aka.ms/LearnAboutSenderIdentification>

EXTERNAL EMAIL - USE CAUTION when clicking links or attachments


You need to set both in case of lwt. your regular non -serial consistency level 
will only applied during commit phase of lwt.


On Wed, 6 Mar, 2024, 03:30 Weng, Justin via user, 
mailto:user@cassandra.apache.org>> wrote:
Hi Cassandra Community,

I’ve been investigating Cassandra Paxos v2 (as implemented in 
CEP-14<https://cwiki.apache.org/confluence/display/CASSANDRA/CEP-14%3A+Paxos+Improvements>)
 which improves the performance of lightweight transaction (LWT). But I’ve got 
a question about setting the commit consistency level for LWT after upgrading 
Paxos.

In 
cqlsh<https://docs.datastax.com/en/cql-oss/3.3/cql/cql_reference/cqlshSerialConsistency.html>,
 gocql<https://github.com/gocql/gocql/blob/master/session.go#L1247> and Python 
driver<https://docs.datastax.com/en/developer/python-driver/3.29/api/cassandra/query/#cassandra.query.Statement.serial_consistency_level>,
 there are two settings for consistency levels: normal Consistency Level and 
Serial Consistency Level. As mentioned in the cqlsh 
documentation<https://docs.datastax.com/en/cql-oss/3.3/cql/cql_reference/cqlshSerialConsistency.html>,
 Serial Consistency Level is only used for LWT and can only be set to either 
SERIAL or LOCAL_SERIAL. However, the Steps for Upgrading 
Paxos<https://github.com/apache/cassandra/blob/trunk/NEWS.txt#L532> and 
CEP-14<https://cwiki.apache.org/confluence/display/CASSANDRA/CEP-14%3A+Paxos+Improvements>
 mention that ANY or LOCAL_QUOROM can be used as the commit consistency level 
for LWT after upgrading Paxos to v2. Therefore, I have a question about how to 
correctly set the commit consistency level to ANY or LOCAL_QUORUM for LWT. 
Namely, which consistency level should I set, the normal Consistency Level or 
Serial Consistency Level?

Any help would be really appreciated.

Thanks,
Justin


Re: Question about commit consistency level for Lightweight Transactions in Paxos v2

2024-03-11 Thread Laxmikant Upadhyay
You need to set both in case of lwt. your regular non -serial consistency
level will only applied during commit phase of lwt.


On Wed, 6 Mar, 2024, 03:30 Weng, Justin via user, 
wrote:

> Hi Cassandra Community,
>
>
>
> I’ve been investigating Cassandra Paxos v2 (as implemented in CEP-14
> )
> which improves the performance of lightweight transaction (LWT). But I’ve
> got a question about setting the commit consistency level for LWT after
> upgrading Paxos.
>
>
>
> In cqlsh
> ,
> gocql  and Python
> driver
> ,
> there are two settings for consistency levels: normal Consistency Level and
> Serial Consistency Level. As mentioned in the cqlsh documentation
> ,
> Serial Consistency Level is only used for LWT and can only be set to either
> SERIAL or LOCAL_SERIAL. However, the Steps for Upgrading Paxos
>  and CEP-14
> 
> mention that ANY or LOCAL_QUOROM can be used as the commit consistency
> level for LWT after upgrading Paxos to v2. Therefore, I have a question
> about how to correctly set the commit consistency level to ANY or
> LOCAL_QUORUM for LWT. Namely, which consistency level should I set, the
> normal Consistency Level or Serial Consistency Level?
>
>
>
> Any help would be really appreciated.
>
>
>
> Thanks,
>
> Justin
>


Question about commit consistency level for Lightweight Transactions in Paxos v2

2024-03-05 Thread Weng, Justin via user
Hi Cassandra Community,

I’ve been investigating Cassandra Paxos v2 (as implemented in 
CEP-14)
 which improves the performance of lightweight transaction (LWT). But I’ve got 
a question about setting the commit consistency level for LWT after upgrading 
Paxos.

In 
cqlsh,
 gocql and Python 
driver,
 there are two settings for consistency levels: normal Consistency Level and 
Serial Consistency Level. As mentioned in the cqlsh 
documentation,
 Serial Consistency Level is only used for LWT and can only be set to either 
SERIAL or LOCAL_SERIAL. However, the Steps for Upgrading 
Paxos and 
CEP-14
 mention that ANY or LOCAL_QUOROM can be used as the commit consistency level 
for LWT after upgrading Paxos to v2. Therefore, I have a question about how to 
correctly set the commit consistency level to ANY or LOCAL_QUORUM for LWT. 
Namely, which consistency level should I set, the normal Consistency Level or 
Serial Consistency Level?

Any help would be really appreciated.

Thanks,
Justin