Commit 97df02cb authored by Daniel Diniz's avatar Daniel Diniz Committed by Evan Read

Update how to enable strong consistency and feature version history

parent 2a5f0189
...@@ -945,8 +945,10 @@ They reflect configuration defined for this instance of Praefect. ...@@ -945,8 +945,10 @@ 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. > - In GitLab 13.3, disabled unless primary-wins voting strategy is disabled.
> - From GitLab 13.4, enabled by default. > - From GitLab 13.4, enabled by default.
> - From GitLab 13.5, you must use Git v2.28.0 or higher on Gitaly nodes to enable strong consistency.
> - From GitLab 13.6, primary-wins voting strategy and `gitaly_reference_transactions_primary_wins` feature flag were removed from the source code.
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.
...@@ -958,18 +960,12 @@ information, see the [strong consistency epic](https://gitlab.com/groups/gitlab- ...@@ -958,18 +960,12 @@ information, see the [strong consistency epic](https://gitlab.com/groups/gitlab-
To enable strong consistency: To enable strong consistency:
- In GitLab 13.5, you must use Git v2.28.0 or higher on Gitaly nodes to enable - In GitLab 13.5, you must use Git v2.28.0 or higher on Gitaly nodes to enable strong consistency.
strong consistency. - In GitLab 13.4 and later, the strong consistency voting strategy has been improved and enabled by default.
- In GitLab 13.4 and later, the strong consistency voting strategy has been Instead of requiring all nodes to agree, only the primary and half of the secondaries need to agree.
improved. Instead of requiring all nodes to agree, only the primary and half - In GitLab 13.3, reference transactions are enabled by default with a primary-wins strategy.
of the secondaries need to agree. This strategy is enabled by default. To This strategy causes all transactions to succeed for the primary and thus does not ensure strong consistency.
disable it and continue using the primary-wins strategy, enable the To enable strong consistency, disable the `:gitaly_reference_transactions_primary_wins` feature flag.
`:gitaly_reference_transactions_primary_wins` feature flag.
- In GitLab 13.3, 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.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.
...@@ -982,6 +978,9 @@ Feature.enable(:gitaly_reference_transactions) ...@@ -982,6 +978,9 @@ Feature.enable(:gitaly_reference_transactions)
Feature.disable(:gitaly_reference_transactions_primary_wins) Feature.disable(:gitaly_reference_transactions_primary_wins)
``` ```
NOTE:
If not set in GitLab, flags are read as false from the console and Praefect uses their default value, which depends on the GitLab version.
To monitor strong consistency, you can use the following Prometheus metrics: To monitor strong consistency, you can use the following Prometheus metrics:
- `gitaly_praefect_transactions_total`: Number of transactions created and - `gitaly_praefect_transactions_total`: Number of transactions created 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