remove resetting of manager properties and init manager props under locking (#5979)
Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>
This commit is contained in:
parent
a5a4214f31
commit
d98d4a9bf0
|
@ -191,6 +191,9 @@ func (m *Manager) ApplyConfig(cfg map[string]sd_config.ServiceDiscoveryConfig) e
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m.cancelDiscoverers()
|
m.cancelDiscoverers()
|
||||||
|
m.targets = make(map[poolKey]map[string]*targetgroup.Group)
|
||||||
|
m.providers = nil
|
||||||
|
m.discoverCancel = nil
|
||||||
for name, scfg := range cfg {
|
for name, scfg := range cfg {
|
||||||
m.registerProviders(scfg, name)
|
m.registerProviders(scfg, name)
|
||||||
discoveredTargets.WithLabelValues(m.name, name).Set(0)
|
discoveredTargets.WithLabelValues(m.name, name).Set(0)
|
||||||
|
@ -280,9 +283,6 @@ func (m *Manager) cancelDiscoverers() {
|
||||||
for _, c := range m.discoverCancel {
|
for _, c := range m.discoverCancel {
|
||||||
c()
|
c()
|
||||||
}
|
}
|
||||||
m.targets = make(map[poolKey]map[string]*targetgroup.Group)
|
|
||||||
m.providers = nil
|
|
||||||
m.discoverCancel = nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Manager) updateGroup(poolKey poolKey, tgs []*targetgroup.Group) {
|
func (m *Manager) updateGroup(poolKey poolKey, tgs []*targetgroup.Group) {
|
||||||
|
|
Loading…
Reference in New Issue