You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by "tijoriwala.ritesh" <ti...@gmail.com> on 2011/02/23 01:59:56 UTC
Does Cassandra use vector clocks
Hi,
I searched online but couldn't get a detailed document on whether Cassandra
uses vector clocks or not? If yes, how does it work. Any pointers to details
will be appreciated.
Thanks,
Ritesh
--
View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Does-Cassandra-use-vector-clocks-tp6054778p6054778.html
Sent from the cassandra-user@incubator.apache.org mailing list archive at Nabble.com.
Re: Does Cassandra use vector clocks
Posted by Joshua Partogi <jo...@gmail.com>.
NO it doesn't. Instead of using vector clock, it checks the column timestamps.
On Wed, Feb 23, 2011 at 11:59 AM, tijoriwala.ritesh
<ti...@gmail.com> wrote:
>
> Hi,
> I searched online but couldn't get a detailed document on whether Cassandra
> uses vector clocks or not? If yes, how does it work. Any pointers to details
> will be appreciated.
>
> Thanks,
> Ritesh
> --
> View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Does-Cassandra-use-vector-clocks-tp6054778p6054778.html
> Sent from the cassandra-user@incubator.apache.org mailing list archive at Nabble.com.
>
--
http://twitter.com/jpartogi
Re: Cassandra deployment options on Terremark
Posted by Jonathan Ellis <jb...@gmail.com>.
Good thread on this recently:
http://www.mail-archive.com/user@cassandra.apache.org/msg09020.html
On Tue, Feb 22, 2011 at 10:38 PM, Sanjay Sharma
<sa...@impetus.co.in> wrote:
> Hi All,
> I am looking for Cassandra deployment options on Terremark eCloud.
> Terremark uses NAS drive so that every machine instance gets allocated disk storage from this NAS, so not sure how the NAS replication model fits in with Cassandra replication model.
> The deployment size would be around 4-5 instances.
> There would also be a replicated remotely located standby/backup cluster.
>
> Regards,
> Sanjay Sharma
>
> ________________________________
>
> Impetus to Present Big Data -- Analytics Solutions and Strategies at TDWI World Conference (Feb 13-18) in Las Vegas.We are also bringing cloud experts together at CloudCamp, Delhi on Feb 12. CloudCamp is an unconference where early adopters of Cloud Computing technologies exchange ideas.
>
> Click http://www.impetus.com to know more.
>
>
> NOTE: This message may contain information that is confidential, proprietary, privileged or otherwise protected by law. The message is intended solely for the named addressee. If received in error, please destroy and notify the sender. Any use of this email is prohibited when received in error. Impetus does not represent, warrant and/or guarantee, that the integrity of this communication has been maintained nor that the communication is free of errors, virus, interception or interference.
>
--
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com
Cassandra deployment options on Terremark
Posted by Sanjay Sharma <sa...@impetus.co.in>.
Hi All,
I am looking for Cassandra deployment options on Terremark eCloud.
Terremark uses NAS drive so that every machine instance gets allocated disk storage from this NAS, so not sure how the NAS replication model fits in with Cassandra replication model.
The deployment size would be around 4-5 instances.
There would also be a replicated remotely located standby/backup cluster.
Regards,
Sanjay Sharma
________________________________
Impetus to Present Big Data -- Analytics Solutions and Strategies at TDWI World Conference (Feb 13-18) in Las Vegas.We are also bringing cloud experts together at CloudCamp, Delhi on Feb 12. CloudCamp is an unconference where early adopters of Cloud Computing technologies exchange ideas.
Click http://www.impetus.com to know more.
NOTE: This message may contain information that is confidential, proprietary, privileged or otherwise protected by law. The message is intended solely for the named addressee. If received in error, please destroy and notify the sender. Any use of this email is prohibited when received in error. Impetus does not represent, warrant and/or guarantee, that the integrity of this communication has been maintained nor that the communication is free of errors, virus, interception or interference.
Re: Does Cassandra use vector clocks
Posted by Oleg Anastastasyev <ol...@gmail.com>.
Jonathan Ellis <jbellis <at> gmail.com> writes:
>
> IMO if you only get CL.ALL it's not superior enough to pessimistic
> locking to justify the complexity of adding it.
>
Yes, may be youre right, but CL.ALL is neccessary only to solve this problem in
a generic way.
In some (most?) cases, conflicts detection, even on read/compaction stage is
enough. Such conflicts can be then resolved in non generic, app specific way
(eg, by specifying some ConflictResolver class on a per CF config). And for app
specific resolution, lower CLs are ok, because they dont require to detect
conflict during update operation.
For example, in our heavy loaded messaging cluster, only 0.015% of updates are
writing to the same column. Employing pessimistic locking for 100% of updates to
resolve that tiny percent of conflicts (and sighnifically raising latency of all
updates) looked like overkill, but all conflicts could be resolved in app
specific way.
It may be even more important to help ppl to diagnose, that conflicting updates
problem do exist in their appllication. Current cassanda's conflict resolution
silently ignores (and overwrites) conflicting updates, making this problem
hidden for prolonged time and, so, difficult to diagnose and fix at early stages
of development.
Re: Does Cassandra use vector clocks
Posted by Jonathan Ellis <jb...@gmail.com>.
On Wed, Feb 23, 2011 at 9:57 AM, Oleg Anastasyev <ol...@gmail.com> wrote:
> From the other hand, the same article says:
> "For conditional writes to work, the condition must be evaluated at all update
> sites before the write can be allowed to succeed."
>
> This means, that when doing such an update CL=ALL must be used.
Exactly.
> This could be a
> bearable price to pay for conflict detection.
IMO if you only get CL.ALL it's not superior enough to pessimistic
locking to justify the complexity of adding it.
--
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com
Re: Does Cassandra use vector clocks
Posted by Oleg Anastasyev <ol...@gmail.com>.
> From the article I linked:
>
> "But wait, some might say, you can avoid all this by using vectors in
> a different way – to prevent update conflicts by issuing conditional
> writes which specify a version (vector) and only succeed if that
> version is still current. Sorry, but no, or at least not generally. In
> a partition-tolerant system, nodes on each side of a partition may
> simultaneously accept conflicting writes against the same initial
> version, and you’ll still have to resolve the conflict when you
> resolve the partition."
>
>From the other hand, the same article says:
"For conditional writes to work, the condition must be evaluated at all update
sites before the write can be allowed to succeed."
This means, that when doing such an update CL=ALL must be used. This could be a
bearable price to pay for conflict detection. Of course for cassandra this could
be not so easy to implement, because , AFAIK, it performs conflict resolution
during reads and compactions, not during writes, like, eg voldemort does.
Re: Does Cassandra use vector clocks
Posted by Jonathan Ellis <jb...@gmail.com>.
On Wed, Feb 23, 2011 at 3:32 AM, Oleg Anastasyev <ol...@gmail.com> wrote:
>> Basically: vector clocks tell you there was a conflict, but not how to
>> resolve it (that is, you simply don't have enough information to
>> resolve it even if you push that back to the client a la Dynamo).
>> What dynamo-like systems mostly VC for is the trivial case of "client
>> X updated field 1, client Y updated field 2, so I can resolve that
>> into a merged value containing both updates." But Cassandra already
>> handles that by splitting the row up into column-per-field, so VC
>> doesn't add anything for us.
>
> Still, vector clocks are very useful in read-modify-update scenarios. In these
> scenarios cassandra requies external pessimistic locking servers, which makes
> cassandra almost unusable for these scenarios, because of introduced latency,
> especially when you have low concurrency for a single column, where optimistic
> locking is a perfect fit.
>From the article I linked:
"But wait, some might say, you can avoid all this by using vectors in
a different way – to prevent update conflicts by issuing conditional
writes which specify a version (vector) and only succeed if that
version is still current. Sorry, but no, or at least not generally. In
a partition-tolerant system, nodes on each side of a partition may
simultaneously accept conflicting writes against the same initial
version, and you’ll still have to resolve the conflict when you
resolve the partition."
--
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com
Re: Does Cassandra use vector clocks
Posted by Oleg Anastasyev <ol...@gmail.com>.
> Basically: vector clocks tell you there was a conflict, but not how to
> resolve it (that is, you simply don't have enough information to
> resolve it even if you push that back to the client a la Dynamo).
> What dynamo-like systems mostly VC for is the trivial case of "client
> X updated field 1, client Y updated field 2, so I can resolve that
> into a merged value containing both updates." But Cassandra already
> handles that by splitting the row up into column-per-field, so VC
> doesn't add anything for us.
Still, vector clocks are very useful in read-modify-update scenarios. In these
scenarios cassandra requies external pessimistic locking servers, which makes
cassandra almost unusable for these scenarios, because of introduced latency,
especially when you have low concurrency for a single column, where optimistic
locking is a perfect fit.
Re: Does Cassandra use vector clocks
Posted by Jonathan Ellis <jb...@gmail.com>.
On Tue, Feb 22, 2011 at 7:37 PM, <Je...@barclayscapital.com> wrote:
> Vector clocks was more of a Dynamo thing, I read a write up somewhere on some of reasons why Cassandra puts this issue on the user but I can't locate it currently unfortunately. Hope this helps.
Basically: vector clocks tell you there was a conflict, but not how to
resolve it (that is, you simply don't have enough information to
resolve it even if you push that back to the client a la Dynamo).
What dynamo-like systems mostly VC for is the trivial case of "client
X updated field 1, client Y updated field 2, so I can resolve that
into a merged value containing both updates." But Cassandra already
handles that by splitting the row up into column-per-field, so VC
doesn't add anything for us.
Some more in depth explanation of the information-to-resolve-conflict
problem: http://pl.atyp.us/wordpress/?p=2601
--
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com
RE: Does Cassandra use vector clocks
Posted by "tijoriwala.ritesh" <ti...@gmail.com>.
Thanks Jeremy for the details. That helps.
--
View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Does-Cassandra-use-vector-clocks-tp6054778p6055129.html
Sent from the cassandra-user@incubator.apache.org mailing list archive at Nabble.com.
RE: Does Cassandra use vector clocks
Posted by Je...@barclayscapital.com.
More a less yes you must handle the synchronization, this only really becomes an issue when multiple hosts hit Cassandra and want to hit the same row/column at the same time, which is certainly possible but may not be common depending on your use case.
this has a bit of info on the column level clock
http://wiki.apache.org/cassandra/DataModel
you can write your own clock resolution in a high level client like hector
http://patricioechague.blogspot.com/2010/12/how-to-create-custom-clockresolution-in.html
single writer timestamp resolution
http://patricioechague.blogspot.com/2010/10/evaluating-timestamp-resolution.html
Vector clocks was more of a Dynamo thing, I read a write up somewhere on some of reasons why Cassandra puts this issue on the user but I can't locate it currently unfortunately. Hope this helps.
-----Original Message-----
From: tijoriwala.ritesh [mailto:tijoriwala.ritesh@gmail.com]
Sent: Tuesday, February 22, 2011 8:13 PM
To: cassandra-user@incubator.apache.org
Subject: Re: Does Cassandra use vector clocks
Thanks for the quick reply. I found this ticket
https://issues.apache.org/jira/browse/CASSANDRA-580 which talks about vector
clock support in Cassandra but it was marked as "won't fix". It would be
insightful to know why it was rejected.
If Cassandra relies on timestamps, does it mean that clients have to be
clock synchronized? This is very difficult in distributed systems.
--
View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Does-Cassandra-use-vector-clocks-tp6054778p6054806.html
Sent from the cassandra-user@incubator.apache.org mailing list archive at Nabble.com.
_______________________________________________
This e-mail may contain information that is confidential, privileged or otherwise protected from disclosure. If you are not an intended recipient of this e-mail, do not duplicate or redistribute it by any means. Please delete it and any attachments and notify the sender that you have received it in error. Unless specifically indicated, this e-mail is not an offer to buy or sell or a solicitation to buy or sell any securities, investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Barclays. Any views or opinions presented are solely those of the author and do not necessarily represent those of Barclays. This e-mail is subject to terms available at the following link: www.barcap.com/emaildisclaimer. By messaging with Barclays you consent to the foregoing. Barclays Capital is the investment banking division of Barclays Bank PLC, a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP. This email may relate to or be sent from other members of the Barclays Group.
_______________________________________________
Re: Does Cassandra use vector clocks
Posted by "tijoriwala.ritesh" <ti...@gmail.com>.
Thanks for the quick reply. I found this ticket
https://issues.apache.org/jira/browse/CASSANDRA-580 which talks about vector
clock support in Cassandra but it was marked as "won't fix". It would be
insightful to know why it was rejected.
If Cassandra relies on timestamps, does it mean that clients have to be
clock synchronized? This is very difficult in distributed systems.
--
View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Does-Cassandra-use-vector-clocks-tp6054778p6054806.html
Sent from the cassandra-user@incubator.apache.org mailing list archive at Nabble.com.