apple / foundationdb

FoundationDB - the open source, distributed, transactional key-value store
https://apple.github.io/foundationdb/
Apache License 2.0
14.19k stars 1.29k forks source link

DataDistribution: Ensure each server has at least one team #1765

Open xumengpanda opened 5 years ago

xumengpanda commented 5 years ago

If a server is not associated with a team, the server will not host any data. When new machines and servers are added to a cluster, we want to make sure data can be moved to the newly added servers so that the average disk utilization per server will be reduced.

However, the current implementation does not enforce that each server is always associated to at least one team.

To find the cases when a server has zero team, we can add the sanity check in getTeamCollectionValid().

Challenge: How to achieve this without causing too much data movement?

xumengpanda commented 5 years ago

One possible solution is to implement a machine-team remover similar actor which removes unideal server teams in the background. Unideal team is defined as the team each of whose members belongs to more than desired number of teams (i.e., 5).

xumengpanda commented 4 years ago

PR#1785 solves at least some of the issues. It guarantees each server has at least one team when replication factor is 3.