Isolation in case of Single Partition Writes and Batching with LWT

2016-09-06 Thread Bhuvan Rawal
Hi, We are working to solve on a multi threaded distributed design which in which a thread reads current state from Cassandra (Single partition ~ 20 Rows), does some computation and saves it back in. But it needs to be ensured that in between reading and writing by that thread any other thread sho

Re: Isolation in case of Single Partition Writes and Batching with LWT

2016-09-09 Thread Bhuvan Rawal
As per this doc conditional batches can contain queries only belonging to that partition. On trying it in 3.6 I got this exception as expected: InvalidRequest: Error from server: code=2200 [Invalid query] message="Batch with cond

Re: Isolation in case of Single Partition Writes and Batching with LWT

2016-09-09 Thread Benedict Elliott Smith
Yes, each partition modified by a batch has its modifications applied altogether, atomically (at the node level). On Friday, 9 September 2016, Bhuvan Rawal wrote: > As per this > doc > conditional batches can contain queries o

Re: Isolation in case of Single Partition Writes and Batching with LWT

2016-09-11 Thread Jens Rantil
Hi, This might be off-topic, but you could always use Zookeeper locking and/or Apache Kafka topic keys for doing things like this. Cheers, Jens On Tuesday, September 6, 2016, Bhuvan Rawal wrote: > Hi, > > We are working to solve on a multi threaded distributed design which in > which a thread

Re: Isolation in case of Single Partition Writes and Batching with LWT

2016-09-11 Thread Ryan Svihla
1. A batch with updates to a single partition turns into a single mutation so partition writes aren't possible (so may as well use Unlogged batches) 2. Yes, so use local_serial or serial reads and all updates you want to honor LWT need to be LWT as well, this way everything is buying into the sam

Re: Isolation in case of Single Partition Writes and Batching with LWT

2016-09-12 Thread Mark Thomas
On 11/09/2016 23:07, Ryan Svihla wrote: > 1. A batch with updates to a single partition turns into a single > mutation so partition writes aren't possible (so may as well use > Unlogged batches) > 2. Yes, so use local_serial or serial reads and all updates you want to > honor LWT need to be LWT as

Re: Isolation in case of Single Partition Writes and Batching with LWT

2016-09-12 Thread Ryan Svihla
It was just the first place google turned up, I made an answer late in the evening trying to help someone out on my own free time. Regards, Ryan Svihla > On Sep 12, 2016, at 6:34 AM, Mark Thomas wrote: > >> On 11/09/2016 23:07, Ryan Svihla wrote: >> 1. A batch with updates to a single partit

Re: Isolation in case of Single Partition Writes and Batching with LWT

2016-09-12 Thread Mark Thomas
On 12/09/2016 13:57, Ryan Svihla wrote: > It was just the first place google turned up, I made an answer late in the > evening trying to help someone out on my own free time. Thanks for the background Ryan. That is really useful. Googling for "CQL" and the first Apache hosted result (for me any

Re: Isolation in case of Single Partition Writes and Batching with LWT

2016-09-12 Thread Jonathan Haddad
It's due to the fact that DataStax hired a bunch of people to write high quality docs over the last several years that have been linked to from all over the internet since the company started publishing them. Rankings are computed by a number of things, one of them being inbound links. I'm not su

Re: Isolation in case of Single Partition Writes and Batching with LWT

2016-09-12 Thread Jim Ancona
Mark, Is there some official Apache policy on which sites it's appropriate to link to on an Apache mailing list? If so, could you please post a link to it so we can all understand the rules. Or is this your personal opinion on what you'd like to see here? Thanks! On Mon, Sep 12, 2016 at 7:34 AM,

External linking Was: Isolation in case of Single Partition Writes and Batching with LWT

2016-09-13 Thread Mark Thomas
On 12/09/2016 19:22, Jim Ancona wrote: > Mark, > > Is there some official Apache policy on which sites it's appropriate to > link to on an Apache mailing list? If so, could you please post a link > to it so we can all understand the rules. Or is this your personal > opinion on what you'd like to s

Re: External linking Was: Isolation in case of Single Partition Writes and Batching with LWT

2016-09-13 Thread Benedict Elliott Smith
Again: *dev list*. "Please Note: These requirements apply to Apache projects: that is, to *individual committer and PMC behaviors* and actions within the context of collaboratively building software products at The Apache Software Foundation. By definition here, "Apache project" means the collabor