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 2022/12/05 14:53:00 UTC

[jira] [Created] (CASSANDRA-18093) `generatetokens` uses the wrong allocation strategy

Branimir Lambov created CASSANDRA-18093:
-------------------------------------------

             Summary: `generatetokens` uses the wrong allocation strategy
                 Key: CASSANDRA-18093
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-18093
             Project: Cassandra
          Issue Type: Bug
            Reporter: Branimir Lambov


When the number of racks is the same as the replication factor, token allocation should use `NoReplicationTokenAllocator`. Because `generatetokens` caches the allocation strategy [here|https://github.com/apache/cassandra/commit/2346ed8241022882e77433e283ab8ce3004d12b0#diff-a93e5fa817f4b6d64484e0c28391b76e1760f51860de7f4f036470766ff5090cR225], it uses one that was created before all the racks are defined and does not switch to the correct one.

This has the effect of constructing very poor allocations for the racks = RF case, especially for the first couple of nodes.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org