cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-1034) Remove assumption that Key to Token is one-to-one
Date Mon, 04 Apr 2011 16:20:06 GMT


Jonathan Ellis commented on CASSANDRA-1034:

I think we are almost done.  A couple comments:

- DK.isEmpty seems like a bad method name for a Key object -- intuitively, keys are a specific
point and should not contain other points except for the obvious identity case.  Would isMinimum
be a better name? 
- I don't understand RP.toSplitValue or why DK would throw away information, when calling
it.  More generally, I'm unclear why we would have null keys in DK -- shouldn't you use a
Token, if you don't have key information?
- using MINIMUM_TOKEN for both sort-before-everything and sort-after-everything values has
always been confusing.  Should we introduce a MAXIMUM_TOKEN value to clear that up?

> Remove assumption that Key to Token is one-to-one
> -------------------------------------------------
>                 Key: CASSANDRA-1034
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Stu Hood
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>             Fix For: 0.8
>         Attachments: 0001-Generify-AbstractBounds.patch, 0001-Make-range-accept-both-Token-and-DecoratedKey.patch,
0002-LengthPartitioner.patch, 0002-Remove-assumption-that-token-and-keys-are-one-to-one-v2.patch,
0002-Remove-assumption-that-token-and-keys-are-one-to-one.patch, 1034_v1.txt
> get_range_slices assumes that Tokens do not collide and converts a KeyRange to an AbstractBounds.
For RandomPartitioner, this assumption isn't safe, and would lead to a very weird heisenberg.
> Converting AbstractBounds to use a DecoratedKey would solve this, because the byte[]
key portion of the DecoratedKey can act as a tiebreaker. Alternatively, we could make DecoratedKey
extend Token, and then use DecoratedKeys in places where collisions are unacceptable.

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message