Merge pull request #401 from erock2112/master
Fix unprotected write in metricMap
This commit is contained in:
commit
2f0e84125d
|
@ -277,6 +277,9 @@ func (m *metricMap) deleteByHashWithLabelValues(
|
||||||
func (m *metricMap) deleteByHashWithLabels(
|
func (m *metricMap) deleteByHashWithLabels(
|
||||||
h uint64, labels Labels, curry []curriedLabelValue,
|
h uint64, labels Labels, curry []curriedLabelValue,
|
||||||
) bool {
|
) bool {
|
||||||
|
m.mtx.Lock()
|
||||||
|
defer m.mtx.Unlock()
|
||||||
|
|
||||||
metrics, ok := m.metrics[h]
|
metrics, ok := m.metrics[h]
|
||||||
if !ok {
|
if !ok {
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Reference in New Issue