Re:Why Cassandra Doesn't Need Vector Clocks
by cbsmith on Thursday September 05, 2013 @01:25AM
(#6332328)
> What marshray suggested would look like this:
create table bucket.users (name text, field text, value text, primary key ((name, field))); - with a composite partition key. Then you'd have two separate single-cell partitions "jbellis:email" : "[email protected]" and "jbellis:phone" : "555-5555". You don't want to do that in either Riak or Cassandra.
Ah I see what you mean. I thought the intent was to group by some unique ID for the user.
Re:Why Cassandra Doesn't Need Vector Clocks
by aphyr on Thursday September 05, 2013 @01:54AM
(#6332414)
you'd be able to write them atomically
To clarify, this is only the case if you use Cassandra 2.0 transactions; normal batched writes are not atomic in the sense you're probably thinking.
Re:Why Cassandra Doesn't Need Vector Clocks
by jeremiahjordan on Thursday September 05, 2013 @11:07AM
(#6334616)
They are atomic, they are not isolated. Those are two different properties. The "A" vs the "I" in ACID. http://en.wikipedia.org/wiki/ACID
Edit: Actually, they are isolated in the sense of ACID, doesn't matter what order you do to operations, the answer will be the same. But not isolated the way you want isolated described.
Re:Why Cassandra Doesn't Need Vector Clocks
by cbsmith on Thursday September 05, 2013 @04:33PM
(#6336741)
The scenario that he's found is when the two timestamps are actually identical. In that scenario, Cassandra cannot maintain its atomicity guarantee.
Re:Why Cassandra Doesn't Need Vector Clocks
by aphyr on Thursday September 05, 2013 @02:22PM
(#6335884)
No, they are not isolated in the sense of ACID. This behavior violates P0.
Re:Why Cassandra Doesn't Need Vector Clocks
by iamaleksey on Thursday September 05, 2013 @03:22AM
(#6332678)
No batching here, just single-partition, two cell update. Atomic, but not isolated in the way you define isolation in your gist.
What marshray suggested would look like this:
create table bucket.users (name text, field text, value text, primary key ((name, field))); - with a composite partition key. Then you'd have two separate single-cell partitions "jbellis:email" : "[email protected]" and "jbellis:phone" : "555-5555". You don't want to do that in either Riak or Cassandra.