You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Marcel Steinbach (Created) (JIRA)" <ji...@apache.org> on 2012/02/09 10:28:59 UTC
[jira] [Created] (CASSANDRA-3880) Random Partitioner does not check
if tokens are outside of its range
Random Partitioner does not check if tokens are outside of its range
--------------------------------------------------------------------
Key: CASSANDRA-3880
URL: https://issues.apache.org/jira/browse/CASSANDRA-3880
Project: Cassandra
Issue Type: Bug
Components: Core
Affects Versions: 1.0.7, 0.7.6
Reporter: Marcel Steinbach
Priority: Minor
Setting up a ring where the tokens are outside RP's token range leads to an unbalanced cluster. The partitioner still reports equally distributed ownership since it calculates ownership only with the _distances_ of the tokens in relation to the maximum token.
E.g. maximum token = 15
token1 = 5
token2 = 10
token3 = 15
token4 = 20
ownership4 = (token4 - token3) / maximum_token = 5 / 15 = 1/3
So token4 claims to own 33.33% of the ring but is not responsible for any primary replicas.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-3880) Random Partitioner does not
check if tokens are outside of its range
Posted by "Harish Doddi (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13222484#comment-13222484 ]
Harish Doddi commented on CASSANDRA-3880:
-----------------------------------------
I would like to do this patch. If there are any issues, please let me know.
> Random Partitioner does not check if tokens are outside of its range
> --------------------------------------------------------------------
>
> Key: CASSANDRA-3880
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3880
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.7.6, 1.0.7
> Reporter: Marcel Steinbach
> Assignee: Harish Doddi
> Priority: Minor
>
> Setting up a ring where the tokens are outside RP's token range leads to an unbalanced cluster. The partitioner still reports equally distributed ownership since it calculates ownership only with the _distances_ of the tokens in relation to the maximum token.
> E.g. maximum token = 15
> token1 = 5
> token2 = 10
> token3 = 15
> token4 = 20
> ownership4 = (token4 - token3) / maximum_token = 5 / 15 = 1/3
> So token4 claims to own 33.33% of the ring but is not responsible for any primary replicas.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-3880) Random Partitioner does not
check if tokens are outside of its range
Posted by "Brandon Williams (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13224648#comment-13224648 ]
Brandon Williams commented on CASSANDRA-3880:
---------------------------------------------
A token greater than 2^127 is invalid.
> Random Partitioner does not check if tokens are outside of its range
> --------------------------------------------------------------------
>
> Key: CASSANDRA-3880
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3880
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.7.6, 1.0.7
> Reporter: Marcel Steinbach
> Assignee: Harish Doddi
> Priority: Minor
>
> Setting up a ring where the tokens are outside RP's token range leads to an unbalanced cluster. The partitioner still reports equally distributed ownership since it calculates ownership only with the _distances_ of the tokens in relation to the maximum token.
> E.g. maximum token = 15
> token1 = 5
> token2 = 10
> token3 = 15
> token4 = 20
> ownership4 = (token4 - token3) / maximum_token = 5 / 15 = 1/3
> So token4 claims to own 33.33% of the ring but is not responsible for any primary replicas.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-3880) Random Partitioner does not
check if tokens are outside of its range
Posted by "Harish Doddi (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13224631#comment-13224631 ]
Harish Doddi commented on CASSANDRA-3880:
-----------------------------------------
Hi,
I have seen from the code the RP's token range as of now is from 0 to 2^127
There are checks in the code if you bring a node with a token > 2^127, you run into a configuration exception. As a result that node cannot be bootstrapped. I validated this by supplying a token > 2^127
If you think there is something I am missing, please let me know.
> Random Partitioner does not check if tokens are outside of its range
> --------------------------------------------------------------------
>
> Key: CASSANDRA-3880
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3880
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.7.6, 1.0.7
> Reporter: Marcel Steinbach
> Assignee: Harish Doddi
> Priority: Minor
>
> Setting up a ring where the tokens are outside RP's token range leads to an unbalanced cluster. The partitioner still reports equally distributed ownership since it calculates ownership only with the _distances_ of the tokens in relation to the maximum token.
> E.g. maximum token = 15
> token1 = 5
> token2 = 10
> token3 = 15
> token4 = 20
> ownership4 = (token4 - token3) / maximum_token = 5 / 15 = 1/3
> So token4 claims to own 33.33% of the ring but is not responsible for any primary replicas.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (CASSANDRA-3880) Random Partitioner does not
check if tokens are outside of its range
Posted by "Harish Doddi (Assigned) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3880?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Harish Doddi reassigned CASSANDRA-3880:
---------------------------------------
Assignee: Harish Doddi
> Random Partitioner does not check if tokens are outside of its range
> --------------------------------------------------------------------
>
> Key: CASSANDRA-3880
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3880
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.7.6, 1.0.7
> Reporter: Marcel Steinbach
> Assignee: Harish Doddi
> Priority: Minor
>
> Setting up a ring where the tokens are outside RP's token range leads to an unbalanced cluster. The partitioner still reports equally distributed ownership since it calculates ownership only with the _distances_ of the tokens in relation to the maximum token.
> E.g. maximum token = 15
> token1 = 5
> token2 = 10
> token3 = 15
> token4 = 20
> ownership4 = (token4 - token3) / maximum_token = 5 / 15 = 1/3
> So token4 claims to own 33.33% of the ring but is not responsible for any primary replicas.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira