Skip to content

Add per repository primary election strategy

Sami Hiltunen requested to merge smh-per-repository-elector into master

Adds a primary elector that picks a primary node for each repository. The elector picks a random node from set of healthy nodes that contain the most up to date generation of the repository. On each change to the clusters health status, the elector checks which repositories currently have an unhealthy primary and elects them new ones.

Electing a primary per repository is necessary foundation for variable replication factors. Currently the primary of a virtual storage needs to have a copy of every repository. This change allows us to spread repositories evenly between the Gitaly nodes in the virtual storage.

This commit implements the first iteration of the elector but does not hook it up anywhere yet.

Edited by Sami Hiltunen

Merge request reports

Loading