There are 2 levels of consistency levels you can define on your query when using Lightweight Transaction:
- one for the Paxos round: SERIAL or LOCAL_SERIAL (which indeed corresponds to QUORUM/LOCAL_QUORUM but named differently so people do not get confused) - one for the consistency of the mutation itself. In this case you can use any CL except SERIAL/LOCAL_SERIAL Setting the consistency level for Paxos is useful in the context of multi data centers only. SERIAL => require a majority wrt RF in all DCs. LOCAL_SERIAL => majority wrt RF in local DC only Hope that helps On Thu, Jan 7, 2016 at 10:44 AM, Hiroyuki Yamada <mogwa...@gmail.com> wrote: > Hi, > > I've been doing some POCs of lightweight transactions and > I come up with some questions, so please let me ask them to you here. > > So the question is: > what consistency level should I set when using IF NOT EXIST or UPDATE IF > statements ? > > I used the statements with ONE and QUORUM first, then it seems fine. > But, when I set SERIAL, it gave me the following error. > > === error message === > Caused by: com.datastax.driver.core.exceptions.InvalidQueryException: > SERIAL is not supported as conditional update commit consistency. Use ANY > if you mean "make sure it is accepted but I don't care how many replicas > commit it for non-SERIAL reads" > === error message === > > > So, I'm wondering what's SERIAL for when writing (and reading) and > what the differences are in setting ONE, QUORUM and ANY when using IF NOT > EXIST or UPDATE IF statements. > > Could you give me some advises ? > > Thanks, > Hiro > > > > >