From 2526ab8c81b31bd29e7914be3f073635b7a48047 Mon Sep 17 00:00:00 2001 From: "Matt T. Proud" Date: Wed, 22 May 2013 14:16:13 +0200 Subject: [PATCH] Code Review: Extend lock scope for appending. --- storage/metric/memory.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/storage/metric/memory.go b/storage/metric/memory.go index 130ce6a0b..bbefb03dd 100644 --- a/storage/metric/memory.go +++ b/storage/metric/memory.go @@ -172,6 +172,8 @@ func (s *memorySeriesStorage) AppendSample(sample model.Sample) error { labelNameValues = append(labelNameValues, fingerprint) s.labelNameToFingerprints[k] = labelNameValues } + + s.Unlock() } series.add(sample.Timestamp, sample.Value)