mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-20 07:19:17 +01:00
lib/promscrape: fix possible deadlock in parallel execution of target relabeling
This commit is contained in:
parent
5c9e657808
commit
6f8866a40a
@ -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 New Issue
Block a user