You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Branimir Lambov (JIRA)" <ji...@apache.org> on 2016/12/15 10:22:58 UTC

[jira] [Commented] (CASSANDRA-12990) More fixes to the TokenAllocator

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

Branimir Lambov commented on CASSANDRA-12990:
---------------------------------------------

Since we don't get the rack info, the new adapter should not [offer a means of getting it|https://github.com/DikangGu/cassandra/commit/d986e89b7b21b5464bd1de7908ee5cb1d12dfd30#diff-bf046c281d96767f4c3c4fe97eeaf938R220] at all. That method shouldn't be called by the no-replication allocator, let's make that clear there and then by adding a comment and throwing.

The adapter should also just return 1 for the replica count, so that the [0 check in {{TokenAllocatorFactory}}|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/dht/tokenallocator/TokenAllocatorFactory.java#L37] can be removed and the 0 replica hack is only done in one place in the code.

Now that {{waitForGossipToSettle}} is in {{Gossiper}}, the name is somewhat redundant. Rename to {{waitToSettle}}?

> More fixes to the TokenAllocator
> --------------------------------
>
>                 Key: CASSANDRA-12990
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12990
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Dikang Gu
>            Assignee: Dikang Gu
>             Fix For: 3.12
>
>
> CASSANDRA-12983 fixes the NoReplicationTokenAllocator in the replication factor equals 0 case.
> We find one more problem that, in our big cluster, ~1000 nodes, the Gossip takes longer time to settle down, so the TokenAllocator may throw NPE when trying to find the dc rack information from the Gossip metadata, in the getStrategy function.
> This patch will fix it, it does two things:
> 1. wait gossip to settle down before trying to allocating tokens.
> 2. for replication factor equals 0 or 1 case, we do not need to check the topology for rack information, since each node will be treated separately. 



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