incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Morton <aa...@thelastpickle.com>
Subject Re: Consistency question caused by Read_all and Write_one
Date Mon, 13 Dec 2010 19:35:53 GMT
In your example is a little unclear.

 If you are writing to a single row and creating columns with user names. Then when you read
all the columns for row 1 you will get columns called Dan and Ken.

If you are writing to the same column, let's say called user, then *if* they are send with
the same time stamp the greater value when compared by bytes will be used. Ken in this case.

If you app has sections that are highly concurrent try to design them away, or use a locking
mechanism outside of casandra, or use another DB.

Hope that helps.
Aaron


On 14/12/2010, at 7:11 AM, Alvin UW <alvinuw@gmail.com> wrote:

> Yes, the same timestamp
> 
> 2010/12/10 Ryan King <ryan@twitter.com>
> On Fri, Dec 10, 2010 at 12:49 PM, Alvin UW <alvinuw@gmail.com> wrote:
> > Hello,
> >
> >
> > I got a consistency problem in Cassandra.
> >
> > Given a column family with a record:    Id   Name
> >                                                         1    David
> >
> > There are three backups for this column family.
> >
> > Assume there are two write operation happens issued by the same application
> > by this order: write_one("1", "Dan") ; write_one("1", "Ken").
> > What will Read_all("1") get?
> >
> > Assume the above two write operations happens exactly the same time in two
> > applications,
> > Again what will Read_all("1") get?
> 
> By "exactly the same" do you mean "with the same timestamp"?
> 
> -ryan
> 

Mime
View raw message