Re: Consistency model

2011-04-18 Thread Peter Schuller
> Does anyone have any intuition about whether this will happen with > consistency_level=ALL?  I will try it today, but I'd like to know what the > expected behavior is.  It seems like it would not happen in this case. Assuming my understanding is correct (see my comment in the JIRA ticket), then

Re: Consistency model

2011-04-18 Thread James Cipar
That's what I thought was happening, yes. A careful reading of the documentation suggests that this is correct behavior. Tyler says this can also occur because of a TimedOutException on the writes. This worries me because TimedOutExceptions are so frequent (at least for my test cluster), ther

Re: Consistency model

2011-04-17 Thread William Oberman
James: I feel like I understand what's going on in your code now based on this discussion, and I'm ok with the fact that DURING a QW you can get "transitional" results from a QR in another process (or either the before or after state of the QW). But once the QW succeeds, you must get the new value

Re: Consistency model

2011-04-17 Thread Milind Parikh
Same process or not: only successful QR reads after successful QW will behave with this guarantee. /*** sent from my android...please pardon occasional typos as I respond @ the speed of thought / On Apr 17, 2011 10:04 AM, "James Cipar" wrote: > For a

Re: Consistency model

2011-04-17 Thread James Cipar
> For a second, I thought this thread was saying I could see value(s) < new > value(s) within the same process on the second read at quorum That's exactly what I'm saying. Within a single process I see this behavior, when reading with consistency_level=QUORUM Read value 1 Read value 2 Read val

Re: Consistency model

2011-04-17 Thread William Oberman
Cool, that is exactly what I was thinking/expecting, and I feel better about the assumptions I've used in my refactor to move from MySQL -> cassandra. I basically gave up on trying to force my code to assume (even at quorum): -read value(s) for key from cassandra -update/add/delete columns for key

Re: Consistency model

2011-04-17 Thread Milind Parikh
William The issue is regarding whether you will see A or B; with any guarantee of either. The discussion implies no; until the QW is complete. /*** sent from my android...please pardon occasional typos as I respond @ the speed of thought / On Apr 17, 20

Re: Consistency model

2011-04-17 Thread Milind Parikh
Successful reads after a successful write @Q have the property of once the read is seen @ one Q, the same read will be seen at any other Q. All others are details that will change with implementation; but,imo, are not bugs. James: in your case, I would think that you have not completed a successf

Re: Consistency model

2011-04-17 Thread William Oberman
>> target_server = '%s:9160'%target_server > >>> try: > >>> pool = pycassa.connect('Keyspace1', [target_server]) > >>> cf = pycassa.ColumnFamily(pool, 'Standard1') > >>>

Re: Consistency model

2011-04-17 Thread James Cipar
timestamp = 0 >>>>> while time.time() < start_time + duration: >>>>> target_server = random.sample(servers, 1)[0] >>>>> target_server = '%s:9160'%target_server >>>>> try: >>>>>

Re: Consistency model

2011-04-17 Thread Sean Bridges
 for line in f: >> >>>             servers.append(line.strip()) >> >>>         f.close() >> >>>         return servers >> >>>     servers = read_servers(hostlist) >> >>>     start_time = time.time() >> >>>     seqnum

Re: Consistency model

2011-04-17 Thread Sean Bridges
= random.sample(servers, 1)[0] >>>>         target_server = '%s:9160'%target_server >>>>         try: >>>>             pool = pycassa.connect('Keyspace1', [target_server]) >>>>             cf = pycassa.ColumnFamily(pool, 'Standa

Re: Consistency model

2011-04-17 Thread James Cipar
t;>> target_server = '%s:9160'%target_server > >>> try: > >>> pool = pycassa.connect('Keyspace1', [target_server]) > >>> cf = pycassa.ColumnFamily(pool, 'Standard1') > >>>

Re: Consistency model

2011-04-17 Thread William Oberman
s:9160'%target_server > >>> try: > >>> pool = pycassa.connect('Keyspace1', [target_server]) > >>> cf = pycassa.ColumnFamily(pool, 'Standard1') > >>> row = cf.get('foo', >

Re: Consistency model

2011-04-16 Thread Jonathan Ellis
arget_server]) >>>             cf = pycassa.ColumnFamily(pool, 'Standard1') >>>             row = cf.get('foo', read_consistency_level=consistency_level) >>>             pool.dispose() >>>         except: >>>             time.sleep(slee

Re: Consistency model

2011-04-16 Thread Sean Bridges
t;>             time.sleep(sleeptime) >>             continue >>         sq = int(row['seqnum']) >>         ts = float(row['timestamp']) >>         if sq < seqnum: >>             print 'Row changed: %i %f -> %i %f'%(seqnum,

Re: Consistency model

2011-04-16 Thread Tyler Hobbs
if sq < seqnum: > print 'Row changed: %i %f -> %i %f'%(seqnum, timestamp, sq, ts) > seqnum = sq > timestamp = ts > > if sleeptime > 0.0: > time.sleep(sleeptime) > > > > > On Apr 16, 2011, at

Re: Consistency model

2011-04-16 Thread James Cipar
M, Tyler Hobbs wrote: > James, > > Would you mind sharing your reader process code as well? > > On Fri, Apr 15, 2011 at 1:14 PM, James Cipar wrote: > I've been experimenting with the consistency model of Cassandra, and I found > something that seems a bit unexpected.

Re: Consistency model

2011-04-16 Thread Tyler Hobbs
James, Would you mind sharing your reader process code as well? On Fri, Apr 15, 2011 at 1:14 PM, James Cipar wrote: > I've been experimenting with the consistency model of Cassandra, and I > found something that seems a bit unexpected. In my experiment, I have 2 > processes,

Re: Consistency model

2011-04-16 Thread Sean Bridges
ailed (which should be reported to your > code via an exception). > > Dan > > -Original Message- > From: James Cipar [mailto:jci...@cmu.edu] > Sent: April-15-11 14:15 > To: user@cassandra.apache.org > Subject: Consistency model > > I've been experimenting with

RE: Consistency model

2011-04-15 Thread Dan Hendry
your code via an exception). Dan -Original Message- From: James Cipar [mailto:jci...@cmu.edu] Sent: April-15-11 14:15 To: user@cassandra.apache.org Subject: Consistency model I've been experimenting with the consistency model of Cassandra, and I found something that seems

Consistency model

2011-04-15 Thread James Cipar
I've been experimenting with the consistency model of Cassandra, and I found something that seems a bit unexpected. In my experiment, I have 2 processes, a reader and a writer, each accessing a Cassandra cluster with a replication factor greater than 1. In addition, sometimes I gen