Re: Lightweight transaction in Multi DC
Yes it will "slow down" as more nodes need to be involved. Yes you will need to use SERIAL for both reads and writes. On 9 Sep. 2017 08:49, "Charulata Sharma (charshar)" <chars...@cisco.com> wrote: > Thanks for your reply. I understand that LOCAL_SERIAL is for within a DC , > will setting up SERIAL not slow down the operation? > > And should I set SERIAL for both read and write phase or just Read phase? > This is becoming a big problem for us. It happens for a small percentage of > > data set but it happens daily because of the highly concurrent and random > DC routing of the received events. > > > > We had a counter implementation prior to CAS, which used to fail most of > the times. CAS provided a big relief but it is still not totally without > errors. > > Would really appreciate the community’s feedback. > > > > Thanks, > > Charu > > > > *From: *vasu gunja <vasu.no...@gmail.com> > *Reply-To: *"user@cassandra.apache.org" <user@cassandra.apache.org> > *Date: *Friday, September 8, 2017 at 1:56 PM > *To: *"user@cassandra.apache.org" <user@cassandra.apache.org> > *Subject: *Re: Lightweight transaction in Multi DC > > > > LOCAL_SERIAL is dc level, SERIAL checks for complete cluster level. > > > > On Fri, Sep 8, 2017 at 2:33 PM, Charulata Sharma (charshar) < > chars...@cisco.com> wrote: > > Yes …it is with LOCAL_SERIAL. Should I be using SERIAL ? > > > > Thanks, > > Charu > > > > *From: *DuyHai Doan <doanduy...@gmail.com> > *Reply-To: *"user@cassandra.apache.org" <user@cassandra.apache.org> > *Date: *Friday, September 8, 2017 at 12:30 PM > *To: *"user@cassandra.apache.org" <user@cassandra.apache.org> > *Subject: *Re: Lightweight transaction in Multi DC > > > > Are you using CAS with SERIAL consistency level for your multi-DC setup ? > > > > On Fri, Sep 8, 2017 at 9:27 PM, Charulata Sharma (charshar) < > chars...@cisco.com> wrote: > > Hi, > > We are facing a serious issue with CAS in a multi DC setup and I > wanted to get some input on it from the forum. > > > > We have a Column family which stores counts for the number of events our > application receives. When the counts reach a certain threshold, > > there is another process which kicks in. The issue that is happening is, > sometimes when concurrent events come in 2 Data Centers, both the events > read the same count > > and increment it to the same value which causes the next process to not > kick in. > > > > When concurrent events come in the same DC, this does not happen, because > in this case, the CAS explicitly fails for one of them. > > However, in case of Multiple DCs this is not happening. Has anyone faced a > similar issue and is there any resolution to this?? I was unable to find > any open Jira on this. > > > > Thanks, > > Charu > > > > > > > > >
Re: Lightweight transaction in Multi DC
Using SERIAL is of course much more expensive, but then the trade-off is that you are guaranteed to have linearizability cross data-centers. Please note that when using Lightweight Transactions, there 2 two distinct consistency levels to be set: 1) The Paxos phase consistency level: SERIAL or LOCAL_SERIAL (equivalent to QUORUM/LOCAL_QUORUM) 2) The commit/Cassandra write consistency level: any normal consistency level Please see this diagram: https://www.slideshare.net/doanduyhai/cassandra-introduction-parisjug/90 The Paxos consistency level applies to phases 1 to 3. The commit consistency level only applies to the last phase. On Sat, Sep 9, 2017 at 12:49 AM, Charulata Sharma (charshar) < chars...@cisco.com> wrote: > Thanks for your reply. I understand that LOCAL_SERIAL is for within a DC , > will setting up SERIAL not slow down the operation? > > And should I set SERIAL for both read and write phase or just Read phase? > This is becoming a big problem for us. It happens for a small percentage of > > data set but it happens daily because of the highly concurrent and random > DC routing of the received events. > > > > We had a counter implementation prior to CAS, which used to fail most of > the times. CAS provided a big relief but it is still not totally without > errors. > > Would really appreciate the community’s feedback. > > > > Thanks, > > Charu > > > > *From: *vasu gunja <vasu.no...@gmail.com> > *Reply-To: *"user@cassandra.apache.org" <user@cassandra.apache.org> > *Date: *Friday, September 8, 2017 at 1:56 PM > *To: *"user@cassandra.apache.org" <user@cassandra.apache.org> > *Subject: *Re: Lightweight transaction in Multi DC > > > > LOCAL_SERIAL is dc level, SERIAL checks for complete cluster level. > > > > On Fri, Sep 8, 2017 at 2:33 PM, Charulata Sharma (charshar) < > chars...@cisco.com> wrote: > > Yes …it is with LOCAL_SERIAL. Should I be using SERIAL ? > > > > Thanks, > > Charu > > > > *From: *DuyHai Doan <doanduy...@gmail.com> > *Reply-To: *"user@cassandra.apache.org" <user@cassandra.apache.org> > *Date: *Friday, September 8, 2017 at 12:30 PM > *To: *"user@cassandra.apache.org" <user@cassandra.apache.org> > *Subject: *Re: Lightweight transaction in Multi DC > > > > Are you using CAS with SERIAL consistency level for your multi-DC setup ? > > > > On Fri, Sep 8, 2017 at 9:27 PM, Charulata Sharma (charshar) < > chars...@cisco.com> wrote: > > Hi, > > We are facing a serious issue with CAS in a multi DC setup and I > wanted to get some input on it from the forum. > > > > We have a Column family which stores counts for the number of events our > application receives. When the counts reach a certain threshold, > > there is another process which kicks in. The issue that is happening is, > sometimes when concurrent events come in 2 Data Centers, both the events > read the same count > > and increment it to the same value which causes the next process to not > kick in. > > > > When concurrent events come in the same DC, this does not happen, because > in this case, the CAS explicitly fails for one of them. > > However, in case of Multiple DCs this is not happening. Has anyone faced a > similar issue and is there any resolution to this?? I was unable to find > any open Jira on this. > > > > Thanks, > > Charu > > > > > > > > >
Re: Lightweight transaction in Multi DC
Thanks for your reply. I understand that LOCAL_SERIAL is for within a DC , will setting up SERIAL not slow down the operation? And should I set SERIAL for both read and write phase or just Read phase? This is becoming a big problem for us. It happens for a small percentage of data set but it happens daily because of the highly concurrent and random DC routing of the received events. We had a counter implementation prior to CAS, which used to fail most of the times. CAS provided a big relief but it is still not totally without errors. Would really appreciate the community’s feedback. Thanks, Charu From: vasu gunja <vasu.no...@gmail.com> Reply-To: "user@cassandra.apache.org" <user@cassandra.apache.org> Date: Friday, September 8, 2017 at 1:56 PM To: "user@cassandra.apache.org" <user@cassandra.apache.org> Subject: Re: Lightweight transaction in Multi DC LOCAL_SERIAL is dc level, SERIAL checks for complete cluster level. On Fri, Sep 8, 2017 at 2:33 PM, Charulata Sharma (charshar) <chars...@cisco.com<mailto:chars...@cisco.com>> wrote: Yes …it is with LOCAL_SERIAL. Should I be using SERIAL ? Thanks, Charu From: DuyHai Doan <doanduy...@gmail.com<mailto:doanduy...@gmail.com>> Reply-To: "user@cassandra.apache.org<mailto:user@cassandra.apache.org>" <user@cassandra.apache.org<mailto:user@cassandra.apache.org>> Date: Friday, September 8, 2017 at 12:30 PM To: "user@cassandra.apache.org<mailto:user@cassandra.apache.org>" <user@cassandra.apache.org<mailto:user@cassandra.apache.org>> Subject: Re: Lightweight transaction in Multi DC Are you using CAS with SERIAL consistency level for your multi-DC setup ? On Fri, Sep 8, 2017 at 9:27 PM, Charulata Sharma (charshar) <chars...@cisco.com<mailto:chars...@cisco.com>> wrote: Hi, We are facing a serious issue with CAS in a multi DC setup and I wanted to get some input on it from the forum. We have a Column family which stores counts for the number of events our application receives. When the counts reach a certain threshold, there is another process which kicks in. The issue that is happening is, sometimes when concurrent events come in 2 Data Centers, both the events read the same count and increment it to the same value which causes the next process to not kick in. When concurrent events come in the same DC, this does not happen, because in this case, the CAS explicitly fails for one of them. However, in case of Multiple DCs this is not happening. Has anyone faced a similar issue and is there any resolution to this?? I was unable to find any open Jira on this. Thanks, Charu
Re: Lightweight transaction in Multi DC
LOCAL_SERIAL is dc level, SERIAL checks for complete cluster level. On Fri, Sep 8, 2017 at 2:33 PM, Charulata Sharma (charshar) < chars...@cisco.com> wrote: > Yes …it is with LOCAL_SERIAL. Should I be using SERIAL ? > > > > Thanks, > > Charu > > > > *From: *DuyHai Doan <doanduy...@gmail.com> > *Reply-To: *"user@cassandra.apache.org" <user@cassandra.apache.org> > *Date: *Friday, September 8, 2017 at 12:30 PM > *To: *"user@cassandra.apache.org" <user@cassandra.apache.org> > *Subject: *Re: Lightweight transaction in Multi DC > > > > Are you using CAS with SERIAL consistency level for your multi-DC setup ? > > > > On Fri, Sep 8, 2017 at 9:27 PM, Charulata Sharma (charshar) < > chars...@cisco.com> wrote: > > Hi, > > We are facing a serious issue with CAS in a multi DC setup and I > wanted to get some input on it from the forum. > > > > We have a Column family which stores counts for the number of events our > application receives. When the counts reach a certain threshold, > > there is another process which kicks in. The issue that is happening is, > sometimes when concurrent events come in 2 Data Centers, both the events > read the same count > > and increment it to the same value which causes the next process to not > kick in. > > > > When concurrent events come in the same DC, this does not happen, because > in this case, the CAS explicitly fails for one of them. > > However, in case of Multiple DCs this is not happening. Has anyone faced a > similar issue and is there any resolution to this?? I was unable to find > any open Jira on this. > > > > Thanks, > > Charu > > > > > > >
Re: Lightweight transaction in Multi DC
Yes …it is with LOCAL_SERIAL. Should I be using SERIAL ? Thanks, Charu From: DuyHai Doan <doanduy...@gmail.com> Reply-To: "user@cassandra.apache.org" <user@cassandra.apache.org> Date: Friday, September 8, 2017 at 12:30 PM To: "user@cassandra.apache.org" <user@cassandra.apache.org> Subject: Re: Lightweight transaction in Multi DC Are you using CAS with SERIAL consistency level for your multi-DC setup ? On Fri, Sep 8, 2017 at 9:27 PM, Charulata Sharma (charshar) <chars...@cisco.com<mailto:chars...@cisco.com>> wrote: Hi, We are facing a serious issue with CAS in a multi DC setup and I wanted to get some input on it from the forum. We have a Column family which stores counts for the number of events our application receives. When the counts reach a certain threshold, there is another process which kicks in. The issue that is happening is, sometimes when concurrent events come in 2 Data Centers, both the events read the same count and increment it to the same value which causes the next process to not kick in. When concurrent events come in the same DC, this does not happen, because in this case, the CAS explicitly fails for one of them. However, in case of Multiple DCs this is not happening. Has anyone faced a similar issue and is there any resolution to this?? I was unable to find any open Jira on this. Thanks, Charu
Re: Lightweight transaction in Multi DC
Are you using CAS with SERIAL consistency level for your multi-DC setup ? On Fri, Sep 8, 2017 at 9:27 PM, Charulata Sharma (charshar) < chars...@cisco.com> wrote: > Hi, > > We are facing a serious issue with CAS in a multi DC setup and I > wanted to get some input on it from the forum. > > > > We have a Column family which stores counts for the number of events our > application receives. When the counts reach a certain threshold, > > there is another process which kicks in. The issue that is happening is, > sometimes when concurrent events come in 2 Data Centers, both the events > read the same count > > and increment it to the same value which causes the next process to not > kick in. > > > > When concurrent events come in the same DC, this does not happen, because > in this case, the CAS explicitly fails for one of them. > > However, in case of Multiple DCs this is not happening. Has anyone faced a > similar issue and is there any resolution to this?? I was unable to find > any open Jira on this. > > > > Thanks, > > Charu > > > > >