cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dikang Gu (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CASSANDRA-12777) Optimize the vnode allocation for single replica per DC
Date Mon, 17 Oct 2016 20:10:58 GMT

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

Dikang Gu edited comment on CASSANDRA-12777 at 10/17/16 8:10 PM:
-----------------------------------------------------------------

[~blambov] thanks a lot for the review! I addressed your comments and here is a new commit.

1. wraparound calculation, for BigIntegerToken, if it's above maximum, I will `mod` the max
token. I also add test and validation for it.
2. I put the createTokenInfo in constructor because I need to populate the unit info according
to the tokens.
3. agree, removed the createTokenInfo
4. I tried different fractions, from 0.50 - 0.99, 0.50 will fail the assertion, otherwise,
they do not make much difference. https://gist.github.com/DikangGu/acd8f568f67b11082443419a8d503b01,
I put 0.75 in this commit.
5. Add the `TokenAllocatorBase`, I keep the factory class because I think it's cleaner to
keep the factory method there.

Thanks!


was (Author: dikanggu):
[~blambov] thanks a lot for the review! I addressed your comments and here is a new commit:
https://github.com/DikangGu/cassandra/commit/402050e32732e67055935689951a56f92b9be281

1. wraparound calculation, for BigIntegerToken, if it's above maximum, I will `mod` the max
token. I also add test and validation for it.
2. I put the createTokenInfo in constructor because I need to populate the unit info according
to the tokens.
3. agree, removed the createTokenInfo
4. I tried different fractions, from 0.50 - 0.99, 0.50 will fail the assertion, otherwise,
they do not make much difference. https://gist.github.com/DikangGu/acd8f568f67b11082443419a8d503b01,
I put 0.75 in this commit.
5. Add the `TokenAllocatorBase`, I keep the factory class because I think it's cleaner to
keep the factory method there.

Thanks!

> Optimize the vnode allocation for single replica per DC
> -------------------------------------------------------
>
>                 Key: CASSANDRA-12777
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12777
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Dikang Gu
>            Assignee: Dikang Gu
>             Fix For: 3.x
>
>
> The new vnode allocation algorithm introduced in CASSANDRA-7032 is optimized for the
situation that there are multiple replicas per DC.
> In our production environment, most cluster only has one replica, in this case, the algorithm
does not work perfectly. It always tries to split token ranges by half, so that the ownership
of "min" node could go as low as ~60% compared to avg.
> So for single replica case, I'm working on a new algorithm, which is based on Branimir's
previous commit, to split token ranges by "some" percentage, instead of always by half. In
this way, we can get a very small variation of the ownership among different nodes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message