mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-10 15:14:09 +00:00
lib/promscrape: fix possible deadlock in parallel execution of target relabeling
This commit is contained in:
parent
68a0f5ce12
commit
59a31171e3
1 changed files with 2 additions and 2 deletions
|
@ -611,9 +611,9 @@ func appendScrapeWorkForTargetLabels(dst []*ScrapeWork, swc *scrapeWorkConfig, t
|
|||
sw *ScrapeWork
|
||||
err error
|
||||
}
|
||||
resultCh := make(chan result)
|
||||
workCh := make(chan map[string]string)
|
||||
goroutines := cgroup.AvailableCPUs()
|
||||
resultCh := make(chan result, len(targetLabels))
|
||||
workCh := make(chan map[string]string, goroutines)
|
||||
for i := 0; i < goroutines; i++ {
|
||||
go func() {
|
||||
for metaLabels := range workCh {
|
||||
|
|
Loading…
Reference in a new issue