From a981b519002bb364f7d736f9788867118cf6ca10 Mon Sep 17 00:00:00 2001 From: Krasi Georgiev Date: Sun, 14 Jan 2018 19:41:53 +0000 Subject: [PATCH] The config map was never reset on applying a new config --- retrieval/manager.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/retrieval/manager.go b/retrieval/manager.go index adf936022..c27bd9507 100644 --- a/retrieval/manager.go +++ b/retrieval/manager.go @@ -83,9 +83,11 @@ func (m *ScrapeManager) Stop() { func (m *ScrapeManager) ApplyConfig(cfg *config.Config) error { done := make(chan struct{}) m.actionCh <- func() { + c := make(map[string]*config.ScrapeConfig) for _, scfg := range cfg.ScrapeConfigs { - m.scrapeConfigs[scfg.JobName] = scfg + c[scfg.JobName] = scfg } + m.scrapeConfigs = c close(done) } <-done