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>2020-07-13 10:14:34 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2020-07-13 10:40:37 +0300
commite1f0ea08608245b298bdfb232e70582bb6c2e79a (patch)
tree6a747d2dfea5b86564d200064a9615ef509a9533
parent1fae8b36711542e66b772164e159f29c14bb4ce4 (diff)
ruby: Adjust transaction-related keys
With commit 1cbfcd74 (metadata: Make transaction serialization functions internal, 2020-07-09), the environment and metadata keys for transaction and Praefect server information have changed to improve consistency with other existing variables. As this was done at the same time as hooking the Ruby server into transactions, both changes crossed and thus the Ruby server is still using the old variables. This wasn't noticed as currently there is no way to observe failure in case we don't hook into transactions, but will be noticed as soon as another change currently in flight lands that takes care to schedule replication jobs on schedule. So let's adjust the keys to fix the incompatibility.
-rw-r--r--ruby/lib/praefect/transaction.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/ruby/lib/praefect/transaction.rb b/ruby/lib/praefect/transaction.rb
index 3ddf6c5f6..608839a48 100644
--- a/ruby/lib/praefect/transaction.rb
+++ b/ruby/lib/praefect/transaction.rb
@@ -1,9 +1,9 @@
module Praefect
class Transaction
- PRAEFECT_SERVER_KEY = "praefect-server".freeze
- PRAEFECT_SERVER_ENV = "PRAEFECT_SERVER".freeze
- TRANSACTION_KEY = "transaction".freeze
- TRANSACTION_ENV = "REFERENCE_TRANSACTION".freeze
+ PRAEFECT_SERVER_KEY = "gitaly-praefect-server".freeze
+ PRAEFECT_SERVER_ENV = "GITALY_PRAEFECT_SERVER".freeze
+ TRANSACTION_KEY = "gitaly-reference-transaction".freeze
+ TRANSACTION_ENV = "GITALY_REFERENCE_TRANSACTION".freeze
def self.from_metadata(metadata)
new(metadata[PRAEFECT_SERVER_KEY], metadata[TRANSACTION_KEY])