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:
-rw-r--r--internal/praefect/config/config.go2
-rw-r--r--internal/praefect/nodes/sql_elector.go2
-rw-r--r--internal/praefect/nodes/sql_elector_test.go2
3 files changed, 3 insertions, 3 deletions
diff --git a/internal/praefect/config/config.go b/internal/praefect/config/config.go
index 8b7c7750e..6c75a3448 100644
--- a/internal/praefect/config/config.go
+++ b/internal/praefect/config/config.go
@@ -54,7 +54,7 @@ type Failover struct {
// MonitorInterval allows set a time duration that would be used after bootstrap is completed to execute health checks.
// The default value is 3s.
MonitorInterval config.Duration `toml:"monitor_interval,omitempty"`
- FailoverTimeout time.Duration `toml:"failover_timeout,omitempty"`
+ Timeout time.Duration `toml:"timeout,omitempty"`
}
// ErrorThresholdsConfigured checks whether returns whether the errors thresholds are configured. If they
diff --git a/internal/praefect/nodes/sql_elector.go b/internal/praefect/nodes/sql_elector.go
index 8a23d0c4b..6003da95a 100644
--- a/internal/praefect/nodes/sql_elector.go
+++ b/internal/praefect/nodes/sql_elector.go
@@ -99,7 +99,7 @@ func newSQLElector(name string, c config.Config, db *sql.DB, log logrus.FieldLog
nodes[i] = &sqlCandidate{Node: n}
}
- failoverTimeout := c.Failover.FailoverTimeout
+ failoverTimeout := c.Failover.Timeout
if failoverTimeout == 0 {
failoverTimeout = defaultFailoverTimeout
}
diff --git a/internal/praefect/nodes/sql_elector_test.go b/internal/praefect/nodes/sql_elector_test.go
index 7e3dfd6f2..f22980be2 100644
--- a/internal/praefect/nodes/sql_elector_test.go
+++ b/internal/praefect/nodes/sql_elector_test.go
@@ -539,7 +539,7 @@ func TestFailoverTimeout(t *testing.T) {
t.Run(tc.desc, func(t *testing.T) {
elector := newSQLElector("", config.Config{
Failover: config.Failover{
- FailoverTimeout: tc.failoverTimeout,
+ Timeout: tc.failoverTimeout,
},
}, nil, testhelper.NewDiscardingLogEntry(t), []*nodeStatus{
{},