Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavlo Strokov <pstrokov@gitlab.com>2020-08-11 16:02:45 +0300
committerPavlo Strokov <pstrokov@gitlab.com>2020-08-11 16:02:45 +0300
commit7f9077a53c07cc894a1ac9210fb8e0f9707c8d34 (patch)
tree77126bae03b74fdb7b3a1c2ef5becdf9b3932c8d
parenta3210b4ffe0842b0ccd175ccbce6e8648fdcbd87 (diff)
parenta1102605a3a7eca3d970683796db2c7d2de68d47 (diff)
Merge branch 'pks-default-enable-primary-wins-reference-transactions' into 'master'
Default-enable primary-wins reference transactions Closes #3027 See merge request gitlab-org/gitaly!2460
-rw-r--r--changelogs/unreleased/pks-default-enable-primary-wins-reference-transactions.yml5
-rw-r--r--doc/design_ha.md9
-rw-r--r--internal/metadata/featureflag/feature_flags.go4
3 files changed, 12 insertions, 6 deletions
diff --git a/changelogs/unreleased/pks-default-enable-primary-wins-reference-transactions.yml b/changelogs/unreleased/pks-default-enable-primary-wins-reference-transactions.yml
new file mode 100644
index 000000000..fcd4ecb28
--- /dev/null
+++ b/changelogs/unreleased/pks-default-enable-primary-wins-reference-transactions.yml
@@ -0,0 +1,5 @@
+---
+title: Default-enable primary-wins reference transaction
+merge_request: 2460
+author:
+type: changed
diff --git a/doc/design_ha.md b/doc/design_ha.md
index 1dff5a289..e00238a07 100644
--- a/doc/design_ha.md
+++ b/doc/design_ha.md
@@ -436,12 +436,13 @@ changes.
## Enabling Strong Consistency
The current implementation of strong consistency via pre-receive hooks is
-guarded by feature flags. In order to make use of it, you thus need to enable
+guarded by feature flags. In order to make use of it, you thus need to disable
the following feature flag:
-- `gitaly_reference_transactions`: Enables usage of reference transactions and
- proxying to multiple Gitaly nodes at once for both SSH and HTTPS receive-pack
- endpoints.
+- `gitaly_reference_transactions_primary_wins`: This feature flag is enabled by
+ default and will cause transactions to always succeed for the primary, no
+ matter what secondaries vote for. To enable strong consistency where nodes
+ need to agree, this feature flag needs to be disabled.
In order to observe reference transactions, two metrics
`gitaly_praefect_transactions_total` and
diff --git a/internal/metadata/featureflag/feature_flags.go b/internal/metadata/featureflag/feature_flags.go
index 7fd74a936..74506f82f 100644
--- a/internal/metadata/featureflag/feature_flags.go
+++ b/internal/metadata/featureflag/feature_flags.go
@@ -20,7 +20,7 @@ var (
// GoPostReceiveHook will bypass the ruby post-receive hook and use the go implementation
GoPostReceiveHook = FeatureFlag{Name: "go_postreceive_hook", OnByDefault: false}
// ReferenceTransactions will handle Git reference updates via the transaction service for strong consistency
- ReferenceTransactions = FeatureFlag{Name: "reference_transactions", OnByDefault: false}
+ ReferenceTransactions = FeatureFlag{Name: "reference_transactions", OnByDefault: true}
// ReferenceTransactionsOperationService will enable reference transactions for the OperationService
ReferenceTransactionsOperationService = FeatureFlag{Name: "reference_transactions_operation_service", OnByDefault: true}
// ReferenceTransactionsSmartHTTPService will enable reference transactions for the SmartHTTPService
@@ -29,7 +29,7 @@ var (
ReferenceTransactionsSSHService = FeatureFlag{Name: "reference_transactions_ssh_service", OnByDefault: true}
// ReferenceTranasctiionsPrimaryWins will change transaction registration such that
// secondaries will take part in transactions, but not influence their outcome.
- ReferenceTransactionsPrimaryWins = FeatureFlag{Name: "reference_transactions_primary_wins", OnByDefault: false}
+ ReferenceTransactionsPrimaryWins = FeatureFlag{Name: "reference_transactions_primary_wins", OnByDefault: true}
// ReferenceTransactionHook will enable the reference-transaction hook
// introduced with Git v2.28.0 for voting on transactions
ReferenceTransactionHook = FeatureFlag{Name: "reference_transaction_hook", OnByDefault: false}