mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-30 15:22:07 +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
|
sw *ScrapeWork
|
||||||
err error
|
err error
|
||||||
}
|
}
|
||||||
resultCh := make(chan result)
|
|
||||||
workCh := make(chan map[string]string)
|
|
||||||
goroutines := cgroup.AvailableCPUs()
|
goroutines := cgroup.AvailableCPUs()
|
||||||
|
resultCh := make(chan result, len(targetLabels))
|
||||||
|
workCh := make(chan map[string]string, goroutines)
|
||||||
for i := 0; i < goroutines; i++ {
|
for i := 0; i < goroutines; i++ {
|
||||||
go func() {
|
go func() {
|
||||||
for metaLabels := range workCh {
|
for metaLabels := range workCh {
|
||||||
|
|
Loading…
Reference in a new issue