cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tyler Hobbs <ty...@datastax.com>
Subject Re: what consistency level should I set when using IF NOT EXIST or UPDATE IF statements ?
Date Thu, 07 Jan 2016 17:44:00 GMT
The python driver docs explain this pretty well, I think:
http://datastax.github.io/python-driver/api/cassandra/query.html#cassandra.query.Statement.serial_consistency_level

On Thu, Jan 7, 2016 at 3:44 AM, Hiroyuki Yamada <mogwaing@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
>
>
>
>
>


-- 
Tyler Hobbs
DataStax <http://datastax.com/>

Mime
View raw message