forked from mirror/client_golang
Fix unprotected write in metricMap
This commit is contained in:
parent
f504d69aff
commit
ddd94f24c5
|
@ -277,6 +277,9 @@ func (m *metricMap) deleteByHashWithLabelValues(
|
|||
func (m *metricMap) deleteByHashWithLabels(
|
||||
h uint64, labels Labels, curry []curriedLabelValue,
|
||||
) bool {
|
||||
m.mtx.Lock()
|
||||
defer m.mtx.Unlock()
|
||||
|
||||
metrics, ok := m.metrics[h]
|
||||
if !ok {
|
||||
return false
|
||||
|
|
Loading…
Reference in New Issue