Re: How does Cassandra handle failure during synchronous writes

2011-02-24 Thread Jonathan Ellis
s? > > Thanks, > Ritesh > -- > View this message in context: > http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/How-does-Cassandra-handle-failure-during-synchronous-writes-tp6055152p6055152.html > Sent from the cassandra-u...@incubator.apache.org mailing li

Re: New thread for : How does Cassandra handle failure during synchronous writes

2011-02-24 Thread Ritesh Tijoriwala
thanks Narendra. I read again the wiki quote you pasted below and now it does make sense. Cassandra's design behavior is to propagate the failed write if it was ever written successfully to atleast one server. I was having hard time trying to work around this but I guess I am starting to think the

Re: New thread for : How does Cassandra handle failure during synchronous writes

2011-02-24 Thread Narendra Sharma
You are missing the point. The coordinator node that is handling the request won't wait for all the nodes to return their copy/digest of data. It just wait for Q (RF/2+1) nodes to return. This is the reason I explained two possible scenarios. Further, on what basis Cassandra will know that the dat

New thread for : How does Cassandra handle failure during synchronous writes

2011-02-24 Thread Anthony John
>>c. Read with CL = QUORUM. If read hits node1 and node2/node3, new data that was written to node1 will be returned. >>In this case - N1 will be identified as a discrepancy and the change will be discarded via read repair >>[Naren] How will Cassandra know this is a discrepancy? Because at Q - on

Re: How does Cassandra handle failure during synchronous writes

2011-02-23 Thread Narendra Sharma
steps you mention, what happens when >>>>>>>>> client tries to read the value at step 6? Is it possible that the >>>>>>>>> client may >>>>>>>>> see the new value? My understanding was if R + W > N, then cli

Re: How does Cassandra handle failure during synchronous writes

2011-02-23 Thread Ritesh Tijoriwala
e that the >>>>>>>>> client may >>>>>>>>> see the new value? My understanding was if R + W > N, then client >>>>>>>>> will not >>>>>>>>> see the new value as Quorum nodes wi

Re: How does Cassandra handle failure during synchronous writes

2011-02-23 Thread Anthony John
e case, then its alright to return failure to the client. >>>>>>>> However, if >>>>>>>> not, then it is difficult to program as after every failure, you as an >>>>>>>> client are not sure if failure is a pseudo failure with

Re: How does Cassandra handle failure during synchronous writes

2011-02-23 Thread Ritesh Tijoriwala
t; However, if >>>>>>>> not, then it is difficult to program as after every failure, you as an >>>>>>>> client are not sure if failure is a pseudo failure with some side >>>>>>>> effects or >>>>>&g

Re: How does Cassandra handle failure during synchronous writes

2011-02-23 Thread Narendra Sharma
;>>>>> >>>>>>> 1. Some replica R fails, but recently, so its failure has not yet >>>>>>> been >>>>>>> detected >>>>>>> 2. A client writes with consistency > 1 >>>>>>> 3. The write goes to all replicas, all replicas except R persist the >>>>>>> write >>>>>>> to disk >>>>>>> 4. Replica R never responds >>>>>>> 5. Failure is returned to the client, but the new value is still in >>>>>>> the >>>>>>> cluster, on all replicas except R. >>>>>>> >>>>>>> Something very similar could happen for CL QUORUM. >>>>>>> >>>>>>> This is a conscious design decision because a commit protocol would >>>>>>> constitute tight coupling between nodes, which goes against the >>>>>>> Cassandra >>>>>>> philosophy. But unfortunately you do have to write your app with this >>>>>>> case >>>>>>> in mind. >>>>>>> >>>>>>> Best, >>>>>>> Dave >>>>>>> >>>>>>> On Tue, Feb 22, 2011 at 8:22 PM, tijoriwala.ritesh < >>>>>>> tijoriwala.rit...@gmail.com> wrote: >>>>>>> >>>>>>> > >>>>>>> > Hi, >>>>>>> > I wanted to get details on how does cassandra do synchronous writes >>>>>>> to W >>>>>>> > replicas (out of N)? Does it do a 2PC? If not, how does it deal >>>>>>> with >>>>>>> > failures of of nodes before it gets to write to W replicas? If the >>>>>>> > orchestrating node cannot write to W nodes successfully, I guess it >>>>>>> will >>>>>>> > fail the write operation but what happens to the completed writes >>>>>>> on X (W >>>>>>> > > >>>>>>> > X) nodes? >>>>>>> > >>>>>>> > Thanks, >>>>>>> > Ritesh >>>>>>> > -- >>>>>>> > View this message in context: >>>>>>> > >>>>>>> http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/How-does-Cassandra-handle-failure-during-synchronous-writes-tp6055152p6055152.html >>>>>>> > Sent from the cassandra-u...@incubator.apache.org mailing list >>>>>>> archive at >>>>>>> > Nabble.com. >>>>>>> > >>>>>>> >>>>>>> >>>>>>> Quoted from: >>>>>>> >>>>>>> http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/How-does-Cassandra-handle-failure-during-synchronous-writes-tp6055152p6055408.html >>>>>>> >>>>>> >>>>>> >>>>> >>>> >>> >> >

Re: How does Cassandra handle failure during synchronous writes

2011-02-23 Thread Ritesh Tijoriwala
;>>>>> even >>>>>> though the quorum fails. Here's a sequence of events that shows the >>>>>> "problem:" >>>>>> >>>>>> 1. Some replica R fails, but recently, so its failure has not yet been >>

Re: How does Cassandra handle failure during synchronous writes

2011-02-23 Thread Anthony John
e is still in the >>>>> cluster, on all replicas except R. >>>>> >>>>> Something very similar could happen for CL QUORUM. >>>>> >>>>> This is a conscious design decision because a commit protocol would >>>>> co

Re: How does Cassandra handle failure during synchronous writes

2011-02-23 Thread Ritesh Tijoriwala
gt; This is a conscious design decision because a commit protocol would >>>> constitute tight coupling between nodes, which goes against the >>>> Cassandra >>>> philosophy. But unfortunately you do have to write your app with this >>>> case >>>

Re: How does Cassandra handle failure during synchronous writes

2011-02-23 Thread Anthony John
t;>> tijoriwala.rit...@gmail.com> wrote: >>> >>> > >>> > Hi, >>> > I wanted to get details on how does cassandra do synchronous writes to >>> W >>> > replicas (out of N)? Does it do a 2PC? If not, how does it deal with >>

Re: How does Cassandra handle failure during synchronous writes

2011-02-23 Thread Ritesh Tijoriwala
; >> tijoriwala.rit...@gmail.com> wrote: >> >> > >> > Hi, >> > I wanted to get details on how does cassandra do synchronous writes to W >> > replicas (out of N)? Does it do a 2PC? If not, how does it deal with >> > failures of of nodes bef

Re: How does Cassandra handle failure during synchronous writes

2011-02-23 Thread Dave Revell
o a 2PC? If not, how does it deal with > > failures of of nodes before it gets to write to W replicas? If the > > orchestrating node cannot write to W nodes successfully, I guess it will > > fail the write operation but what happens to the completed writes on X (W > > > >

Re: How does Cassandra handle failure during synchronous writes

2011-02-23 Thread Aaron Morton
it deal with >> failures of of nodes before it gets to write to W replicas? If the >> orchestrating node cannot write to W nodes successfully, I guess it will >> fail the write operation but what happens to the completed writes on X (W > >> X) nodes? >> >> Thanks, >> Ritesh >> -- >> View this message in context: >> http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/How-does-Cassandra-handle-failure-during-synchronous-writes-tp6055152p6055152.html >> Sent from the cassandra-u...@incubator.apache.org mailing list archive at >> Nabble.com. >> >

Re: How does Cassandra handle failure during synchronous writes

2011-02-23 Thread Javier Canillas
t; orchestrating node cannot write to W nodes successfully, I guess it will >> fail the write operation but what happens to the completed writes on X (W >> > >> X) nodes? >> >> Thanks, >> Ritesh >> -- >> View this message in context: >> <

Re: How does Cassandra handle failure during synchronous writes

2011-02-23 Thread Aaron Morton
gt; > X) nodes? > > Thanks, > Ritesh > -- > View this message in context: > http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/How-does-Cassandra-handle-failure-during-synchronous-writes-tp6055152p6055152.html > Sent from the cassandra-u...@incubator.apache.org mailing list archive at > Nabble.com. >

Re: How does Cassandra handle failure during synchronous writes

2011-02-22 Thread Dave Revell
essfully, I guess it will > fail the write operation but what happens to the completed writes on X (W > > X) nodes? > > Thanks, > Ritesh > -- > View this message in context: > http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/How-does-Cassandra-handle-fai