Re: Definition of QUORUM consistency level

2017-06-08 Thread Jeff Jirsa
Short of actually making ConsistencyLevel pluggable or adding/changing one of the existing levels, an alternative approach would be to divide up the cluster into either real or pseudo-datacenters (with RF=2 in each DC), and then write with QUORUM (which would be 3 nodes, across any combination of d

Re: Definition of QUORUM consistency level

2017-06-08 Thread Justin Cameron
Firstly, this situation only occurs if you need strong consistency and are using an even replication factor (RF4, RF6, etc). Secondly, either the read or write still need to be performed at a minimum level of QUORUM. This means there are no extra availability benefits from your proposal (i.e. a min

Re: Definition of QUORUM consistency level

2017-06-08 Thread Jeff Jirsa
Would love to see real pluggable consistency levels. Sorta sad it got wont-fixed - may be time to revisit that, perhaps it's more feasible now. https://issues.apache.org/jira/browse/CASSANDRA-8119 is also semi-related, but a different approach (CL-as-UDF) On Thu, Jun 8, 2017 at 9:26 PM, Brandon W

Re: Definition of QUORUM consistency level

2017-06-08 Thread Brandon Williams
I don't disagree with you there and have never liked TWO/THREE. This is somewhat relevant: https://issues.apache.org/jira/browse/CASSANDRA-2338 I don't think going to CL.FOUR, etc, is a good long-term solution, but I'm also not sure what is. On Thu, Jun 8, 2017 at 11:20 PM, Dikang Gu wrote: >

Re: Definition of QUORUM consistency level

2017-06-08 Thread Dikang Gu
To me, CL.TWO and CL.THREE are more like work around of the problem, for example, they do not work if the number of replicas go to 8, which does possible in our environment (2 replicas in each of 4 DCs). What people want from quorum is strong consistency guarantee, as long as R+W > N, there are th

Re: Definition of QUORUM consistency level

2017-06-08 Thread Nate McCall
> So, for the quorum, what we really want is that there is one overlap among > the nodes in write path and read path. It actually was my assumption for a > long time that we need (N/2 + 1) for write and just need (N/2) for read, > because it's enough to provide the strong consistency. > You are wr

Re: Definition of QUORUM consistency level

2017-06-08 Thread Nate McCall
> > > So, for the quorum, what we really want is that there is one overlap among >> the nodes in write path and read path. It actually was my assumption for a >> long time that we need (N/2 + 1) for write and just need (N/2) for read, >> because it's enough to provide the strong consistency. >> > >

Re: Definition of QUORUM consistency level

2017-06-08 Thread Nate McCall
> We have CL.TWO. > > > This was actually the original motivation for CL.TWO and CL.THREE if memory serves: https://issues.apache.org/jira/browse/CASSANDRA-2013

Re: Definition of QUORUM consistency level

2017-06-08 Thread Brandon Williams
We have CL.TWO. On Thu, Jun 8, 2017 at 10:03 PM, Dikang Gu wrote: > So, for the quorum, what we really want is that there is one overlap among > the nodes in write path and read path. It actually was my assumption for a > long time that we need (N/2 + 1) for write and just need (N/2) for read, >

Re: Definition of QUORUM consistency level

2017-06-08 Thread Dikang Gu
So, for the quorum, what we really want is that there is one overlap among the nodes in write path and read path. It actually was my assumption for a long time that we need (N/2 + 1) for write and just need (N/2) for read, because it's enough to provide the strong consistency. On Thu, Jun 8, 2017

Re: Definition of QUORUM consistency level

2017-06-08 Thread Jonathan Haddad
It would be a little weird to change the definition of QUORUM, which means majority, to mean something other than majority for a single use case. Sounds like you want to introduce a new CL, HALF. On Thu, Jun 8, 2017 at 7:43 PM Dikang Gu wrote: > Justin, what I suggest is that for QUORUM consisten

Re: Definition of QUORUM consistency level

2017-06-08 Thread Dikang Gu
Justin, what I suggest is that for QUORUM consistent level, the block for write should be (num_replica/2)+1, this is same as today, but for read request, we just need to access (num_replica/2) nodes, which should provide enough strong consistency. Dikang. On Thu, Jun 8, 2017 at 7:38 PM, Justin Ca

Re: Definition of QUORUM consistency level

2017-06-08 Thread Justin Cameron
2/4 for write and 2/4 for read would not be sufficient to achieve strong consistency, as there is no overlap. In your particular case you could potentially use QUORUM for write and TWO for read (or vice-versa) and still achieve strong consistency. If you add additional nodes in the future this wou

Definition of QUORUM consistency level

2017-06-08 Thread Dikang Gu
Hello there, We have some use cases are doing consistent read/write requests, and we have 4 replicas in that cluster, according to our setup. What's interesting to me is that, for both read and write quorum requests, they are blocked for 4/2+1 = 3 replicas, so we are accessing 3 (for write) + 3 (

Splitting up CHANGES

2017-06-08 Thread Murukesh Mohanan
Python recently made a switch to Github, and I was an interested onlooker. One thing I found relevant to Cassandra was a new tool added by Larry Hastings, called blurb (https://github.com/larryhastings/blurb): > blurb is a tool designed to rid CPython core development of the scourge of > Misc/N

New contribution - Burst Hour Compaction Strategy

2017-06-08 Thread Pedro Gordo
Hi all As part of my MSc project, I've done a new compaction strategy for Cassandra, called Burst Hour Compaction Strategy. You can find the JIRA ticket here: https://issues.apache.org/jira/browse/CASSANDRA-12201 In a nutshell, the background compaction for this strategy is only triggered during