Commit 84a38565 authored by Patrick Steinhardt's avatar Patrick Steinhardt

Update documentatiton on how to enable strong consistency

Starting with Gitaly 13.3, reference transactions are enabled by default
with a primary-wins strategy. While Gitalies will now vote on reference
updates by default, this still doesn't enable strong consistency as the
primary will always succeed no matter what secondaries vote for. As a
result, an admin now only has to change the voting strategy to not use
the primary-wins strategy in order to enable strong consistency.

Adjust the documentation to match this.
parent 32776dac
......@@ -979,6 +979,7 @@ They reflect configuration defined for this instance of Praefect.
> - Introduced in GitLab 13.1 in [alpha](https://about.gitlab.com/handbook/product/gitlab-the-product/#alpha-beta-ga), disabled by default.
> - Entered [beta](https://about.gitlab.com/handbook/product/gitlab-the-product/#alpha-beta-ga) in GitLab 13.2, disabled by default.
> - From GitLab 13.3, disabled unless primary-wins reference transactions strategy is disabled.
Praefect guarantees eventual consistency by replicating all writes to secondary nodes
after the write to the primary Gitaly node has happened.
......@@ -991,15 +992,21 @@ information, see the [strong consistency epic](https://gitlab.com/groups/gitlab-
To enable strong consistency:
- In GitLab 13.2 and later, enable the `:gitaly_reference_transactions` feature flag.
- In GitLab 13.3 and later, reference transactions are enabled by default with
a primary-wins strategy. This strategy causes all transactions to succeed for
the primary and thus does not ensure strong consistency. To enable strong
consistency, disable the `:gitaly_reference_transactions_primary_wins`
feature flag.
- In GitLab 13.2, enable the `:gitaly_reference_transactions` feature flag.
- In GitLab 13.1, enable the `:gitaly_reference_transactions` and `:gitaly_hooks_rpc`
feature flags.
Enabling feature flags requires [access to the Rails console](../feature_flags.md#start-the-gitlab-rails-console).
Changing feature flags requires [access to the Rails console](../feature_flags.md#start-the-gitlab-rails-console).
In the Rails console, enable or disable the flags as required. For example:
```ruby
Feature.enable(:gitaly_reference_transactions)
Feature.disable(:gitaly_reference_transactions_primary_wins)
```
To monitor strong consistency, use the `gitaly_praefect_transactions_total` and
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment