Re: Read/Write consistency issue

2014-01-10 Thread Robert Wille
, 2014 at 4:59 PM To: Subject: Re: Read/Write consistency issue As was pointed out earlier, Consistency.ALL is still subject to the possibility of clock drift between nodes, and there is also the problem of using the exact same timestamp, which is increasingly likely to happen the faster you update

Re: Read/Write consistency issue

2014-01-10 Thread Manoj Khangaonkar
old is the value that was read from the column. val is the value that needs to be added to it. new is (old + val) that is written back to the column. regards On Fri, Jan 10, 2014 at 4:36 PM, Andrey Ilinykh wrote: > For single thread, consistency ALL it should work. I believe you do > somethin

Re: Read/Write consistency issue

2014-01-10 Thread Andrey Ilinykh
For single thread, consistency ALL it should work. I believe you do something different. What are these three numbers exactly? old=60616 val =19 new =60635 On Fri, Jan 10, 2014 at 1:50 PM, Manoj Khangaonkar wrote: > Hi > > Using Cassandra 2.0.0. > 3 node cluster > Replication 2. > Using consiste

Re: Read/Write consistency issue

2014-01-10 Thread Steven A Robenalt
>>> On Fri, Jan 10, 2014 at 2:35 PM, Robert Wille wrote: >>> >>>> Actually, locking won’t fix the problem. He’s getting the problem on a >>>> single thread. >>>> >>>> I’m pretty sure that if updates can occur within the same millisecond

Re: Read/Write consistency issue

2014-01-10 Thread Tupshin Harper
> >>> On Fri, Jan 10, 2014 at 2:35 PM, Robert Wille wrote: >>> >>>> Actually, locking won’t fix the problem. He’s getting the problem on a >>>> single thread. >>>> >>>> I’m pretty sure that if updates can occur within the same millisec

Re: Read/Write consistency issue

2014-01-10 Thread Steven A Robenalt
its epidermal layer”.. > > > > *From:* Tupshin Harper [mailto:tups...@tupshin.com] > *Sent:* Friday, January 10, 2014 5:13 PM > > *To:* user@cassandra.apache.org > *Subject:* Re: Read/Write consistency issue > > > > It is bad because of the risk of concurrent m

Re: Read/Write consistency issue

2014-01-10 Thread Manoj Khangaonkar
is clock skew), there is literally nothing you can do to >>> make this pattern work. >>> >>> Robert >>> >>> From: Todd Carrico >>> Reply-To: >>> Date: Friday, January 10, 2014 at 3:28 PM >>> To: "user@cassandra.apache.org&quo

RE: Read/Write consistency issue

2014-01-10 Thread Todd Carrico
m: Tupshin Harper [mailto:tups...@tupshin.com] Sent: Friday, January 10, 2014 5:13 PM To: user@cassandra.apache.org Subject: Re: Read/Write consistency issue It is bad because of the risk of concurrent modifications. If you don't have some kind of global lock on the document/row, then 2 readers mig

RE: Read/Write consistency issue

2014-01-10 Thread Todd Carrico
, January 10, 2014 4:52 PM To: user@cassandra.apache.org Subject: Re: Read/Write consistency issue Interested in knowing more on why read-before-write is an anti-pattern. In the next month or so, I intend to use Cassandra as a doc store. One very common operation will be to read the document, make a

Re: Read/Write consistency issue

2014-01-10 Thread Tupshin Harper
Robert > > From: Steven A Robenalt > Reply-To: > Date: Friday, January 10, 2014 at 3:41 PM > > To: > Subject: Re: Read/Write consistency issue > > My understanding is that it's generally a Cassandra anti-pattern to do > read-before-write in any case, not jus

Re: Read/Write consistency issue

2014-01-10 Thread Tupshin Harper
re is literally nothing you can do to >> make this pattern work. >> >> Robert >> >> From: Todd Carrico >> Reply-To: >> Date: Friday, January 10, 2014 at 3:28 PM >> To: "user@cassandra.apache.org" >> Subject: RE: Read/Write consistency is

Re: Read/Write consistency issue

2014-01-10 Thread Robert Wille
rapid repeated writing is not an issue. Why would this be bad? Robert From: Steven A Robenalt Reply-To: Date: Friday, January 10, 2014 at 3:41 PM To: Subject: Re: Read/Write consistency issue My understanding is that it's generally a Cassandra anti-pattern to do read-before-write i

Re: Read/Write consistency issue

2014-01-10 Thread Steven A Robenalt
ake this pattern work. > > Robert > > From: Todd Carrico > Reply-To: > Date: Friday, January 10, 2014 at 3:28 PM > To: "user@cassandra.apache.org" > Subject: RE: Read/Write consistency issue > > That, or roll your own locking. Means multiple updates, but

RE: Read/Write consistency issue

2014-01-10 Thread Todd Carrico
Is it possible to pin to a node, instead of letting the client find the next node (round robin)? Sorry, a C* noob here... tc From: Robert Wille [mailto:rwi...@fold3.com] Sent: Friday, January 10, 2014 4:35 PM To: user@cassandra.apache.org Subject: Re: Read/Write consistency issue Actually

Re: Read/Write consistency issue

2014-01-10 Thread Robert Wille
: Date: Friday, January 10, 2014 at 3:28 PM To: "user@cassandra.apache.org" Subject: RE: Read/Write consistency issue That, or roll your own locking. Means multiple updates, but it works reliably. tc From: Robert Wille [mailto:rwi...@fold3.com] Sent: Friday, January 10, 2014

RE: Read/Write consistency issue

2014-01-10 Thread Todd Carrico
That, or roll your own locking. Means multiple updates, but it works reliably. tc From: Robert Wille [mailto:rwi...@fold3.com] Sent: Friday, January 10, 2014 4:25 PM To: user@cassandra.apache.org Subject: Re: Read/Write consistency issue Cassandra is a last-write wins kind of a deal. The last

Re: Read/Write consistency issue

2014-01-10 Thread Robert Wille
at 2:50 PM To: Subject: Read/Write consistency issue Hi Using Cassandra 2.0.0. 3 node cluster Replication 2. Using consistency ALL for both read and writes. I have a single thread that reads a value, updates it and writes it back to the table. The column type is big int. Updating counts for a

Read/Write consistency issue

2014-01-10 Thread Manoj Khangaonkar
Hi Using Cassandra 2.0.0. 3 node cluster Replication 2. Using consistency ALL for both read and writes. I have a single thread that reads a value, updates it and writes it back to the table. The column type is big int. Updating counts for a timestamp. With single thread and consistency ALL , I e