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:
authorJohn Cai <jcai@gitlab.com>2022-06-02 17:51:15 +0300
committerJohn Cai <jcai@gitlab.com>2022-07-13 19:00:04 +0300
commit6537b017a11b21e2993a24f46bfd2475382c37bd (patch)
tree3fdcd8983bf0b90b5e5d63b01291d7846a806388
parent7ed10ad441251c13a6b1759f7aa50f01d12a08e4 (diff)
gitaly main: Start ConcurrencyTracker
Instantiate a ConcurrencyTracker in the main goroutine and pass it in through service dependencies.
-rw-r--r--cmd/gitaly/main.go31
1 files changed, 17 insertions, 14 deletions
diff --git a/cmd/gitaly/main.go b/cmd/gitaly/main.go
index 43012ae2f..73c9b2fc7 100644
--- a/cmd/gitaly/main.go
+++ b/cmd/gitaly/main.go
@@ -257,6 +257,8 @@ func run(cfg config.Cfg) error {
defer rubySrv.Stop()
streamCache := streamcache.New(cfg.PackObjectsCache, glog.Default())
+ concurrencyTracker := hook.NewConcurrencyTracker()
+ prometheus.MustRegister(concurrencyTracker)
for _, c := range []starter.Config{
{Name: starter.Unix, Addr: cfg.SocketPath, HandoverOnUpgrade: true},
@@ -282,20 +284,21 @@ func run(cfg config.Cfg) error {
}
setup.RegisterAll(srv, &service.Dependencies{
- Cfg: cfg,
- RubyServer: rubySrv,
- GitalyHookManager: hookManager,
- TransactionManager: transactionManager,
- StorageLocator: locator,
- ClientPool: conns,
- GitCmdFactory: gitCmdFactory,
- Linguist: ling,
- CatfileCache: catfileCache,
- DiskCache: diskCache,
- PackObjectsCache: streamCache,
- Git2goExecutor: git2goExecutor,
- UpdaterWithHooks: updaterWithHooks,
- HousekeepingManager: housekeepingManager,
+ Cfg: cfg,
+ RubyServer: rubySrv,
+ GitalyHookManager: hookManager,
+ TransactionManager: transactionManager,
+ StorageLocator: locator,
+ ClientPool: conns,
+ GitCmdFactory: gitCmdFactory,
+ Linguist: ling,
+ CatfileCache: catfileCache,
+ DiskCache: diskCache,
+ PackObjectsCache: streamCache,
+ PackObjectsConcurrencyTracker: concurrencyTracker,
+ Git2goExecutor: git2goExecutor,
+ UpdaterWithHooks: updaterWithHooks,
+ HousekeepingManager: housekeepingManager,
})
b.RegisterStarter(starter.New(c, srv))
}