cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlos Rolo <r...@pythian.com>
Subject Re: IF EXISTS checks on all nodes?
Date Thu, 12 May 2016 13:05:38 GMT
Hello,

As far as I know, lightweight transactions only apply to a single
partition, so in your case it will only execute on the nodes responsible
for that partition. And as a consequence, those nodes will all be in the
same state when the transaction ends (If it would apply).

Please refer to this blog post for more information about the LIghtweigth
transactions:
http://www.datastax.com/dev/blog/lightweight-transactions-in-cassandra-2-0



Regards,

Carlos Juzarte Rolo
Cassandra Consultant / Datastax Certified Architect / Cassandra MVP

Pythian - Love your data

rolo@pythian | Twitter: @cjrolo | Skype: cjr2k3 | Linkedin:
*linkedin.com/in/carlosjuzarterolo
<http://linkedin.com/in/carlosjuzarterolo>*
Mobile: +351 918 918 100
www.pythian.com

On Thu, May 12, 2016 at 12:17 PM, Siddharth Verma <
verma.siddharth@snapdeal.com> wrote:

> Hi,
> If i have inconsistent data on nodes
> Scenario :
> I have 2 DCs each with 3 nodes
> and I have inconsistent data on them
>
> node 1,2,3,4,5 have
> P1,100,A,val1,w1
> P1,100,B,val2,w2
>
> node 6 has
> P1,100,A,val1,w1
> P1,100,B,val2,w2
> P1,200,C,val3,w3
> P1,200,D,val4,w4
>
> col1, col2, col3,col4,col5 in table
> Primary key (col1, col2, col3)
>
> Now i execute the query from CQLSH
> update mykeyspace.my_table_1 set col5 = 'w_x' where col1='P1' and col2=200
> and col3='C' IF EXISTS;
>
> Is it possible that
> node 1,2,3,4,5 will get the entry
> P1,200,C,null,w_x
>
> I.e. IF EXISTS is checked per node or only once and then execute on all?
>
> Thanks
> Siddharth Verma
>

-- 


--




Mime
View raw message