These are chat archives for atomix/atomix
If you have three nodes and want to add a fourth, just start the fourth with the first 3 nodes as the bootstrap nodes. The new configuration will be replicated and existing partitions will be automatically rebalanced. That’s what the test I added does. The only caveat is that the number of Raft partitions cannot change, which is what’s broken here.
The first two are opposed to each other. If we replicate the number of partitions, then the number of partitions is essentially based on the initial cluster configuration. If you start a three node cluster with three partitions, then adding a fourth won’t change the number of partitions and the user doesn’t have to worry about the configuration so much. Alternatively, if the number of partitions is a required configuration that’s not based on the initial cluster configuration, then it’s the responsibility of the user to ensure all the nodes are configured with the same number of partitions.
I think what may make sense is this:
• The number of Raft partitions should be replicated in the cluster metadata
• In order to support the use case where a single node is used to bootstrap a larger cluster, the default number of partitions for a 1-node cluster should be > 1
• But the number of partitions for a >1-node cluster should be n*2 unless otherwise specified
This allows a cluster to be bootstrapped from a single node without creating a single-partition cluster, allows the number of partitions to be customized, and prevent partition configurations in new nodes from conflicting with the actual number of partitions, which is the problem with manual configuration