Re: Basic question on a write operation immediately followed by a read

2011-01-25 Thread Roshan Dawrani
2011/1/25 Wangpei (Peter) > for your 1-node cluster, ANY is the only consistency level that client > may returns BEFORE node write to memory table. > > And read op on the node read both the memory table and SSTable. > > > > It real puzzle me. :( > Please don't be puzzled just yet. :-) As I sa

Re: Basic question on a write operation immediately followed by a read

2011-01-25 Thread Wangpei (Peter)
@cassandra.apache.org; hector-us...@googlegroups.com 主题: Re: Basic question on a write operation immediately followed by a read 2011/1/25 Wangpei (Peter) mailto:peter.wang...@huawei.com>> What is the ConsistencyLevel value? Is it ConsistencyLevel.ANY? I am using Hector 0.7.0-22 and getting keysp

Re: Basic question on a write operation immediately followed by a read

2011-01-24 Thread Roshan Dawrani
2011/1/25 Wangpei (Peter) > What is the ConsistencyLevel value? Is it ConsistencyLevel.ANY? > > I am using Hector 0.7.0-22 and getting keyspace as * HFactory.createKeyspace()*, which seems to be defaulting the consistency level to QUORAM for both reads and writes. Nowhere else, it is explicitly

Re: Basic question on a write operation immediately followed by a read

2011-01-24 Thread Oleg Anastasyev
> Is there a possibility that my read operation may miss the data that just got inserted? If write operation did not resulted in exception and there was no other clients writing to the same row/column concurrently - you will read exactly what you just written. > > Since there are no DB transactio

Re: Basic question on a write operation immediately followed by a read

2011-01-24 Thread Wangpei (Peter)
han Dawrani [mailto:roshandawr...@gmail.com] 发送时间: 2011年1月25日 10:57 收件人: user@cassandra.apache.org; hector-us...@googlegroups.com 主题: Basic question on a write operation immediately followed by a read Hi, I have a basic question - maybe silly too. Say, I have a 1-node Cassandra setup (no replication, eventual

Re: Basic question on a write operation immediately followed by a read

2011-01-24 Thread Roshan Dawrani
2011/1/25 Patricio Echagüe > Roshan, when a client invoke a write, the write goes first to commit log > and later to memtable. After that it returns to the client. > > After it reaches the memtable, that data is ready to be read. > > The reads consolidates de data from the memtables and sstables

Re: Basic question on a write operation immediately followed by a read

2011-01-24 Thread Patricio Echagüe
Roshan, when a client invoke a write, the write goes first to commit log and later to memtable. After that it returns to the client. After it reaches the memtable, that data is ready to be read. The reads consolidates de data from the memtables and sstables unless there is a hit in the row cache.

Re: Basic question on a write operation immediately followed by a read

2011-01-24 Thread Roshan Dawrani
Thanks for your inputs, Victor. In my app, it's a bit event driven. We do writes and fire events and listeners then read - so we can't predict how soon the reads will come. Sometimes they came too fast, which is better for our app, if we can have a Cassandra DB level understanding that they won't

Re: Basic question on a write operation immediately followed by a read

2011-01-24 Thread Roshan Dawrani
On Tue, Jan 25, 2011 at 9:57 AM, Victor Kabdebon wrote: > As far as I remember, please correct me if I am wrong, on a one node > cluster : > First Commitlog is updated then almost immediatly after order is send to > the memtable to add this new insert. You might have a very short delay > between t

Re: Basic question on a write operation immediately followed by a read

2011-01-24 Thread Roshan Dawrani
2011/1/25 Patricio Echagüe > Roshan, for specifics have a look at > http://wiki.apache.org/cassandra/ArchitectureOverview specially where it > says "Write path". I went through the "Write path" section and have a small follow-up question, please - again assuming a 1-node setup for now. How muc

Re: Basic question on a write operation immediately followed by a read

2011-01-24 Thread Roshan Dawrani
On Tue, Jan 25, 2011 at 9:32 AM, Victor Kabdebon wrote: > Roshan, just remember, what you do on a one node cluster might not be valid > on a 5 node cluster. Depending on the way your insert and query (QUORUM, > ALL, ... ) your data might not be available to get, yet it will be in your > cluster. I

Re: Basic question on a write operation immediately followed by a read

2011-01-24 Thread Roshan Dawrani
Thanks, Victor. Even in our application, it will be an advantage if the data can be immediately read and reads don't miss it for even the smallest amount of time after write queries have been executed at the app level. I am in the middle of migrating an app to Cassandra and observing some small a

Basic question on a write operation immediately followed by a read

2011-01-24 Thread Roshan Dawrani
Hi, I have a basic question - maybe silly too. Say, I have a 1-node Cassandra setup (no replication, eventual consistency, etc) and I do an insert into a column family and then very close in time to the insert, I do a read on it for the same data. Is there a possibility that my read operation ma