Re: Relation between Atomic Batches and Consistency Level

2014-03-18 Thread Drew Kutcharian
Alright, this is much better. The main thing I’m trying to figure out is that if there is a way to stop the batch if the first statement fails or there is a better pattern/construct for Cassandra to handle that scenario. - Drew On Mar 18, 2014, at 4:46 AM, Jonathan Lacefield wrote: > Okay you

Re: Relation between Atomic Batches and Consistency Level

2014-03-18 Thread Jonathan Lacefield
Okay your question is clear to me know. My understanding, after talking this through with some of the engineers here, is that we have 2 levels of success with batches: 1) Did the batch make it to the batch log table? [yes or no] - yes = success - no = not success 2) Did each sta

Re: Relation between Atomic Batches and Consistency Level

2014-03-17 Thread Drew Kutcharian
I have read that blog post which actually was the source of the initial confusion ;) If I write normally (no batch) at Quorum, then a hinted write wouldn’t count as a valid write so the write wouldn’t succeed, which means I would have to retry. That’s a pretty well defined outcome. Now if I wr

Re: Relation between Atomic Batches and Consistency Level

2014-03-17 Thread Jonathan Lacefield
Hello, Have you seen this blog post, it's old but still relevant. I think it will answer your questions. http://www.datastax.com/dev/blog/atomic-batches-in-cassandra-1-2. I think the answer lies in how Cassandra defines a batch "In the context of a Cassandra batch operation, atomic means tha

Re: Relation between Atomic Batches and Consistency Level

2014-03-17 Thread Drew Kutcharian
Hi Jonathan, I’m still a bit unclear on this. Say I have two CQL3 tables: - user (replication of 3) - user_email_index (replication of 3) Now I create a new logged batch at quorum consistency level and put two inserts in there: #1 Insert into the “user" table with partition key of a timeuuid of

Re: Relation between Atomic Batches and Consistency Level

2014-03-17 Thread Jonathan Lacefield
Hello, Consistency is declared at the statement level, i.e. batch level when writing, but enforced at each batch row level. My understanding is that each batch (and all of it's contents) will be controlled through a specific CL declaration. So batch A could use a CL of QUORUM while batch B cou

Relation between Atomic Batches and Consistency Level

2014-03-15 Thread Drew Kutcharian
Hi Guys, How do Atomic Batches and Consistency Level relate to each other? More specifically: - Is consistency level set/applicable per statement in the batch or the batch as a whole? - Say if I write a Logged Batch at QUORUM and read it back at QUORUM, what can I expect at normal, single nod