Commit f2d27fa6 authored by Evan Read's avatar Evan Read

Merge branch 'pks-gitaly-strong-consistency-flags' into 'master'

Update documentatiton on how to enable strong consistency

See merge request gitlab-org/gitlab!39193
parents b557d34d 84a38565
...@@ -979,6 +979,7 @@ They reflect configuration defined for this instance of Praefect. ...@@ -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. > - 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. > - 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 Praefect guarantees eventual consistency by replicating all writes to secondary nodes
after the write to the primary Gitaly node has happened. 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- ...@@ -991,15 +992,21 @@ information, see the [strong consistency epic](https://gitlab.com/groups/gitlab-
To enable strong consistency: 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` - In GitLab 13.1, enable the `:gitaly_reference_transactions` and `:gitaly_hooks_rpc`
feature flags. 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: In the Rails console, enable or disable the flags as required. For example:
```ruby ```ruby
Feature.enable(:gitaly_reference_transactions) Feature.enable(:gitaly_reference_transactions)
Feature.disable(:gitaly_reference_transactions_primary_wins)
``` ```
To monitor strong consistency, use the `gitaly_praefect_transactions_total` and 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