Skip to content

Document lazy failovers in Praefect

Sami Hiltunen requested to merge smh-document-lazy-failovers into master

What does this MR do?

  • Praefect has stopped eagerly performing failovers and now only elects a new primary if the current one is unhealthy and a primary is needed to serve a request. This commit documents the new failover behavior.

  • Praefect's failover strategy has become more flexible with recent changes. These changes have done away with the read-only mode. The read-only mode blocked writes to a repository if the primary was outdated. With the new failover logic, Praefect will instead failover from the outdated primary to an up to date one. Given this, the read-only mode no longer exists. This commit removes references to the read-only mode from Praefect's documentation.

  • Praefect's dataloss now includes in the output repositories which are unavailable on the cluster. With variable replication factor, it's no longer sufficient to only list the repositories which have outdated, assigned replicas. A repository with replication factor of one may be fully up to date but may be unavailable if the only replica is unhealthy. This amounts to dataloss if the Gitaly node is not brought back online.

    Praefects lazy failover behavior has also made the read-only mode non-existent, as Praefect now immediately fails over to an up to date replica if one is available. Praefect also no longer elects outdated replicas as primaries. Given these changes, this commit updates the dataloss documentation to reflect these behaviors.

Related issues

Author's checklist (required)

Do not add the feature, frontend, backend, ~"bug", or database labels if you are only updating documentation. These labels will cause the MR to be added to code verification QA issues.

When applicable:

Review checklist

All reviewers can help ensure accuracy, clarity, completeness, and adherence to the Documentation Guidelines and Style Guide.

1. Primary Reviewer

  • Review by a code reviewer or other selected colleague to confirm accuracy, clarity, and completeness. This can be skipped for minor fixes without substantive content changes.

2. Technical Writer

  • Technical writer review. If not requested for this MR, must be scheduled post-merge. To request for this MR, assign the writer listed for the applicable DevOps stage.

For more information about labels, see Technical Writing workflows - Labels.

For suggestions that you are confident don't need to be reviewed, change them locally and push a commit directly to save others from unneeded reviews. For example:

  • Clear typos, like this is a typpo.
  • Minor issues, like single quotes instead of double quotes, Oxford commas, and periods.

For more information, see our documentation on Merging a merge request.

3. Maintainer

  1. Review by assigned maintainer, who can always request/require the above reviews. Maintainer's review can occur before or after a technical writer review.
  2. Ensure a release milestone is set.
  3. If there has not been a technical writer review, create an issue for one using the Doc Review template.
Edited by Evan Read

Merge request reports