Skip to content

Only elect assigned nodes in per repository elector

Sami Hiltunen requested to merge smh-elector-assignments into master

As a preparation for variable replication factor, Praefect gained support for assigning host nodes for repositories in 243dc385. Since not every node is guaranteed to host a repository anymore, we need to take the host assignments in to account when performing primary elections.

This commit changes the PerRepositoryElector to take the repository assignments in to account. Primary is selected only from the set of assigned nodes for each repository. Otherwise the election strategy remains unchanged.

Related #2971 (closed)

Merge request reports