diff options
author | Pavlo Strokov <pstrokov@gitlab.com> | 2020-03-28 00:28:25 +0300 |
---|---|---|
committer | Pavlo Strokov <pstrokov@gitlab.com> | 2020-04-02 17:55:54 +0300 |
commit | cc314adf47d3eed96d824f35ae601e891e2e70e2 (patch) | |
tree | 29aaf04e869e4299a0ccff12fe985ab7ece33c5d /internal/praefect/config | |
parent | 61fa556719b444d8dacb4622555df97f6c69e2bc (diff) |
Praefect: Postgres queue implementation in use
Implementation of the replication events queue now can be
switched using `postgres_queue_enabled` between in-memory
and Postgres.
`Datastore` changed from interface to struct as there is no
single struct implementation for it anymore.
Closes: https://gitlab.com/gitlab-org/gitaly/-/issues/2166
Diffstat (limited to 'internal/praefect/config')
-rw-r--r-- | internal/praefect/config/config.go | 1 | ||||
-rw-r--r-- | internal/praefect/config/config_test.go | 1 | ||||
-rw-r--r-- | internal/praefect/config/testdata/config.toml | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/internal/praefect/config/config.go b/internal/praefect/config/config.go index e6d0efa3e..da7f76015 100644 --- a/internal/praefect/config/config.go +++ b/internal/praefect/config/config.go @@ -30,6 +30,7 @@ type Config struct { Auth auth.Config `toml:"auth"` DB `toml:"database"` FailoverEnabled bool `toml:"failover_enabled"` + PostgresQueueEnabled bool `toml:"postgres_queue_enabled"` } // VirtualStorage represents a set of nodes for a storage diff --git a/internal/praefect/config/config_test.go b/internal/praefect/config/config_test.go index 24f2702d3..07e4fb449 100644 --- a/internal/praefect/config/config_test.go +++ b/internal/praefect/config/config_test.go @@ -179,6 +179,7 @@ func TestConfigParsing(t *testing.T) { SSLKey: "/path/to/key", SSLRootCert: "/path/to/root-cert", }, + PostgresQueueEnabled: true, }, }, //TODO: Remove this test, as well as the fixture in testdata/single-virtual-storage.config.toml diff --git a/internal/praefect/config/testdata/config.toml b/internal/praefect/config/testdata/config.toml index 0fc25ea9d..330470c90 100644 --- a/internal/praefect/config/testdata/config.toml +++ b/internal/praefect/config/testdata/config.toml @@ -1,6 +1,7 @@ listen_addr = "" socket_path = "" prometheus_listen_addr = "" +postgres_queue_enabled = true [logging] format = "json" |