Re: How does cassandra achieve Linearizability?

2017-02-26 Thread Kant Kodali
Is there way to apply the commits from this https://github.com/bdeggleston/cassandra/tree/CASSANDRA-6246-trunk branch to Apache Cassandra 3.10 branch? I thought I could just merge these two branches but looks like there are several trunks so I am confused which trunk I am merging to? I want to

Re: How does cassandra achieve Linearizability?

2017-02-22 Thread Michael Shuler
I updated the fix version on CASSANDRA-6246 to 4.x. The 3.11.x edit was a bulk move when removing the cassandra-3.X branch and the 3.x Jira version. There are likely other new feature tickets that should really say 4.x. -- Kind regards, Michael On 02/22/2017 07:28 PM, Kant Kodali wrote: > I

Re: How does cassandra achieve Linearizability?

2017-02-22 Thread Kant Kodali
I hope that patch is reviewed as quickly as possible. We use LWT's heavily and we are getting a throughput of 600 writes/sec and each write is 1KB in our case. On Wed, Feb 22, 2017 at 7:48 AM, Edward Capriolo wrote: > > > On Wed, Feb 22, 2017 at 9:47 AM, Ariel

Re: How does cassandra achieve Linearizability?

2017-02-22 Thread Edward Capriolo
On Wed, Feb 22, 2017 at 9:47 AM, Ariel Weisberg wrote: > Hi, > > No it's not going to be in 3.11.x. The earliest release it could make it > into is 4.0. > > Ariel > > On Wed, Feb 22, 2017, at 03:34 AM, Kant Kodali wrote: > > Hi Ariel, > > Can we really expect the fix in 3.11.x

Re: How does cassandra achieve Linearizability?

2017-02-22 Thread Ariel Weisberg
Hi, No it's not going to be in 3.11.x. The earliest release it could make it into is 4.0. Ariel On Wed, Feb 22, 2017, at 03:34 AM, Kant Kodali wrote: > Hi Ariel, > > Can we really expect the fix in 3.11.x as the ticket > https://issues.apache.org/jira/browse/CASSANDRA-6246[1] says? >

Re: How does cassandra achieve Linearizability?

2017-02-22 Thread Kant Kodali
Hi Ariel, Can we really expect the fix in 3.11.x as the ticket https://issues.apache. org/jira/browse/CASSANDRA-6246 says? Thanks, kant On Thu, Feb 16, 2017 at 2:12 PM, Ariel Weisberg wrote:

Re: How does cassandra achieve Linearizability?

2017-02-16 Thread Ariel Weisberg
Hi, That would work and would help a lot with the dueling proposer issue. A lot of the leader election stuff is designed to reduce the number of roundtrips and not just address the dueling proposer issue. Those will have downtime because it's there for correctness. Just adding an affinity

Re: How does cassandra achieve Linearizability?

2017-02-16 Thread Edward Capriolo
On Thu, Feb 16, 2017 at 4:33 PM, Ariel Weisberg wrote: > Hi, > > Classic Paxos doesn't have a leader. There are variants on the original > Lamport approach that will elect a leader (or some other variation like > Mencius) to improve throughput, latency, and performance under

Re: How does cassandra achieve Linearizability?

2017-02-16 Thread Ariel Weisberg
Hi, Classic Paxos doesn't have a leader. There are variants on the original Lamport approach that will elect a leader (or some other variation like Mencius) to improve throughput, latency, and performance under contention. Cassandra implements the approach from the beginning of "Paxos Made

Re: How does cassandra achieve Linearizability?

2017-02-16 Thread Kant Kodali
@Ariel Weisberg EPaxos looks very interesting as it looks like it doesn't need any designated leader for C* but I am assuming the paxos that is implemented today for LWT's requires Leader election and If so, don't we need to have an odd number of nodes or racks or DC's to satisfy N = 2F + 1

Re: How does cassandra achieve Linearizability?

2017-02-10 Thread Kant Kodali
Thanks Ariel! Yes I knew there are so many variations and optimizations of Paxos. I just wanted to see if we had any plans on improving the existing Paxos implementation and it is great to see the work is under progress! I am going to follow that ticket and read up the references pointed in it

Re: How does cassandra achieve Linearizability?

2017-02-10 Thread Ariel Weisberg
Hi, Cassandra's implementation of Paxos doesn't implement many optimizations that would drastically improve throughput and latency. You need consensus, but it doesn't have to be exorbitantly expensive and fall over under any kind of contention. For instance you could implement EPaxos

Re: How does cassandra achieve Linearizability?

2017-02-10 Thread Benjamin Roth
Hi Kant, If you read the published papers about Paxos, you will most probably recognize that there is no way to "do it better". This is a conceptional thing due to the nature of distributed systems + the CAP theorem. If you want A+P in the triangle, then C is very expensive. CS is made for A+P

Re: How does cassandra achieve Linearizability?

2017-02-10 Thread Kant Kodali
"That’s the safety blanket everyone wants but is extremely expensive, especially in Cassandra." yes LWT's are expensive. Are there any plans to make this better? On Fri, Feb 10, 2017 at 12:17 AM, Kant Kodali wrote: > Hi Jon, > > Thanks a lot for your response. I am well

Re: How does cassandra achieve Linearizability?

2017-02-10 Thread Kant Kodali
Hi Jon, Thanks a lot for your response. I am well aware that the LWW != LWT but I was talking more in terms of LWW with respective to LWT's which I believe you answered. so thanks much! kant On Thu, Feb 9, 2017 at 6:01 PM, Jon Haddad wrote: > LWT != Last Write Wins.

Re: How does cassandra achieve Linearizability?

2017-02-09 Thread Jon Haddad
LWT != Last Write Wins. They are totally different. LWTs give you (assuming you also read at SERIAL) “atomic consistency”, meaning you are able to perform operations atomically and in isolation. That’s the safety blanket everyone wants but is extremely expensive, especially in Cassandra.

Re: How does cassandra achieve Linearizability?

2017-02-09 Thread Michael Shuler
On 02/09/2017 07:21 PM, Kant Kodali wrote: > @Justin I read this article > http://www.datastax.com/dev/blog/lightweight-transactions-in-cassandra-2-0. > And it clearly says Linearizable consistency can be achieved with LWT's. > so should I assume the Linearizability in the context of the above >

Re: How does cassandra achieve Linearizability?

2017-02-09 Thread Kant Kodali
@Justin I read this article http://www.datastax.com/dev/blog/lightweight-transactions-in-cassandra-2-0. And it clearly says Linearizable consistency can be achieved with LWT's. so should I assume the Linearizability in the context of the above article is possible with LWT's and synchronization of

Re: How does cassandra achieve Linearizability?

2017-02-09 Thread Michael Shuler
If you require the best precision you can get, setting up a pair of stratum 1 ntpd masters in each data center location with a GPS modules is not terribly complex. Low latency and jitter on servers you manage. 140ms is a long way away network-wise, and I would suggest that was a poor choice of

Re: How does cassandra achieve Linearizability?

2017-02-09 Thread Justin Cameron
I think the answer to that question will depend on your specific use case and requirements. If you're only doing a small number of updates but need to be sure they are applied in order you may be able to use lightweight transactions (keep in mind there's a performance hit here, so it's not an

Re: How does cassandra achieve Linearizability?

2017-02-09 Thread Jonathan Haddad
It doesn't, nor does it claim to. On Thu, Feb 9, 2017 at 4:09 PM Kant Kodali wrote: > How does Cassandra achieve Linearizability with “Last write wins” > (conflict resolution methods based on time-of-day clocks) ? > > Relying on synchronized clocks are almost certainly

Re: How does cassandra achieve Linearizability?

2017-02-09 Thread Kant Kodali
Hi Justin, There are bunch of issues w.r.t to synchronization of clocks when we used ntpd. Also the time it took to sync the clocks was approx 140ms (don't quote me on it though because it is reported by our devops :) we have multiple clients (for example bunch of micro services are reading from

Re: How does cassandra achieve Linearizability?

2017-02-09 Thread Justin Cameron
Hi Kant, Clock synchronization is important - you should ensure that ntpd is properly configured on all nodes. If your particular use case is especially sensitive to out-of-order mutations it is possible to set timestamps on the client side using the drivers.