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:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2021-09-16 14:22:03 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-11-23 16:11:00 +0300
commitc9d9385e47b44fb7ec20cdd35003bfc466543cb2 (patch)
treeadd1ea245389b126606fb5bb8400707cdd177bdd
parent567160d48fbb6a3a4d41b033211f5cff5a8190be (diff)
featureflag: Add feature flag for proper atomic repository creation
Add a new feature flag which guards the code implementing proper atomic guarantees for repository creation RPCs.
-rw-r--r--internal/metadata/featureflag/ff_tx_atomic_repository_creation.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/metadata/featureflag/ff_tx_atomic_repository_creation.go b/internal/metadata/featureflag/ff_tx_atomic_repository_creation.go
new file mode 100644
index 000000000..456f7da0e
--- /dev/null
+++ b/internal/metadata/featureflag/ff_tx_atomic_repository_creation.go
@@ -0,0 +1,8 @@
+package featureflag
+
+// TxAtomicRepositoryCreation will switch CreateRepository, CreateRepositoryFromBundle,
+// CreateRepositoryFromSnapshot and CreateRepositoryFromURL to have proper transactional guarantees.
+// This changes behaviour such the target repository must not exist previous to the call, creation
+// and seeding of the repository is done in a temporary staging area and then moved into place only
+// if no other RPC call created it concurrently.
+var TxAtomicRepositoryCreation = NewFeatureFlag("tx_atomic_repository_creation", false)