You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2014/04/01 16:53:18 UTC

[jira] [Comment Edited] (CASSANDRA-6477) Partitioned indexes

    [ https://issues.apache.org/jira/browse/CASSANDRA-6477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13955260#comment-13955260 ] 

Jonathan Ellis edited comment on CASSANDRA-6477 at 4/1/14 2:52 PM:
-------------------------------------------------------------------

Sylvain had a different idea:

Instead of just writing a {{24, user1}} tombstone, write a tombstone that indicates what the value changed to: {{24, user1 -> 25}} for one thread, and {{24, user1 -> 26}} for the other.

When the tombstones are merged for compaction or read you can say, "Wait! 2 people tried to erase that, one with 25 the other with 26, let's check which one has a higher timestamp and delete any obsolete entries."

Note that this requires reading the existing data row to get the old indexed value, but in exchange for introducing read-before-write we also get to add the desired denormalization into the index and no longer have to check the original data row for reach read.


was (Author: jbellis):
Sylvain had a different idea:

Instead of just writing a {{24, user1}} tombstone, write a tombstone that indicates what the value changed to: {{24, user1 -> 25}} for one thread, and {{24, user1 -> 26}} for the other.

When the tombstones are merged for compaction or read you can say, "Wait! 2 people tried to erase that, one with 25 the other with 26, let's check which one has a higher timestamp and delete any obsolete entries."


> Partitioned indexes
> -------------------
>
>                 Key: CASSANDRA-6477
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6477
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: API, Core
>            Reporter: Jonathan Ellis
>             Fix For: 3.0
>
>
> Local indexes are suitable for low-cardinality data, where spreading the index across the cluster is a Good Thing.  However, for high-cardinality data, local indexes require querying most nodes in the cluster even if only a handful of rows is returned.



--
This message was sent by Atlassian JIRA
(v6.2#6252)