[
https://issues.apache.org/jira/browse/CASSANDRA-1034?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12862084#action_12862084
]
Jonathan Ellis commented on CASSANDRA-1034:
-------------------------------------------
The problem is that we are using DK both for routing and for local key sorting,
partly because it's very convenient to be able to use the "natural" compareTo
to compare those two kinds of DK.
If the only place we have DK with null key is for the routing case, then the
right thing is to convert those usages to raw Tokens and make key non-optional
in DK.
i have a nagging feeling that there are more complications though.
> Remove assumption that Key to Token is one-to-one
> -------------------------------------------------
>
> Key: CASSANDRA-1034
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1034
> Project: Cassandra
> Issue Type: Bug
> Reporter: Stu Hood
>
> 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.
-
You can reply to this email to add a comment to the issue online.