diff options
author | Pavlo Strokov <pstrokov@gitlab.com> | 2021-10-06 09:22:36 +0300 |
---|---|---|
committer | Pavlo Strokov <pstrokov@gitlab.com> | 2021-10-06 09:22:36 +0300 |
commit | cd94be7ff514fd2e3e84910c42a46995c444b70a (patch) | |
tree | c922b65bd0152eab579e676650ea6de6c2ee40fe /cmd | |
parent | 01501de90099b3f4ad52e5e4d5015361a0d44571 (diff) | |
parent | 064d5be95393430a820b7dad5683ca5467f97ab5 (diff) |
Merge branch 'ps-replication-parallel-processing' into 'master'
replication: Process replication events for storages in parallel
See merge request gitlab-org/gitaly!3894
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/praefect/main.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/praefect/main.go b/cmd/praefect/main.go index 6470c52c9..65328d49e 100644 --- a/cmd/praefect/main.go +++ b/cmd/praefect/main.go @@ -356,7 +356,7 @@ func run(cfgs []starter.Config, conf config.Config) error { repl = praefect.NewReplMgr( logger, - conf.VirtualStorageNames(), + conf.StorageNames(), queue, rs, healthChecker, @@ -364,6 +364,7 @@ func run(cfgs []starter.Config, conf config.Config) error { praefect.WithDelayMetric(delayMetric), praefect.WithLatencyMetric(latencyMetric), praefect.WithDequeueBatchSize(conf.Replication.BatchSize), + praefect.WithParallelStorageProcessingWorkers(conf.Replication.ParallelStorageProcessingWorkers), ) srvFactory = praefect.NewServerFactory( conf, @@ -426,7 +427,7 @@ func run(cfgs []starter.Config, conf config.Config) error { return fmt.Errorf("unable to start the bootstrap: %v", err) } - go repl.ProcessBacklog(ctx, praefect.ExpBackoffFunc(1*time.Second, 5*time.Second)) + go repl.ProcessBacklog(ctx, praefect.ExpBackoffFactory{Start: time.Second, Max: 5 * time.Second}) logger.Info("background started: processing of the replication events") repl.ProcessStale(ctx, 30*time.Second, time.Minute) logger.Info("background started: processing of the stale replication events") |