Skip to content

Support repository specific primaries and host assignments in dataloss

Sami Hiltunen requested to merge smh-dataloss-primaries into master

Adds support for repository specific primaries and variable replication factor in dataloss. When 'per_repository' elector is in use, the dataloss returns repository specific primaries from the database. Assignments are taken into account if they are set for the repository. If the repository has no assignments, all configured storages are considered assigned as a fallback to Praefect's behavior before assignments were introduced.

As before, dataloss by default only returns read-only repositories. When fetching also partially replicated writable repositories, only repositories which have at least one outdated assigned node are printed out. Having an outdated copy of the repository on an unassigned node does not indicate the repository's replication factor has not been met, only that there is an extra copy lying around.

This also changes praefect dataloss to use repository specific primaries in the tests to cover assert they are correctly printed out per repository. Assignments are also set for the repositories in order to test omitting the 'assigned host' message when a storage is not assigned.

Related to #2971 (closed)
Related to #3133 (closed)
Closes #3199 (closed)
Closes #3301 (closed)

Documentation update: gitlab!49578 (merged)

Edited by Sami Hiltunen

Merge request reports

Loading