fix deadlock in scrape manager (#4894)

Scrape manager will fall in deadlock when we reload configs frequently.
This commit is contained in:
Wei Guo 2018-11-23 17:23:55 +08:00 committed by Krasi Georgiev
parent cfb3769274
commit 996fd958ac
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ func (m *Manager) reload() {
scrapeConfig, ok := m.scrapeConfigs[setName]
if !ok {
level.Error(m.logger).Log("msg", "error reloading target set", "err", "invalid config id:"+setName)
return
continue
}
sp = newScrapePool(scrapeConfig, m.append, log.With(m.logger, "scrape_pool", setName))
m.scrapePools[setName] = sp