Skip to content

Commit

Permalink
fix metric.lock race (#544) (#545)
Browse files Browse the repository at this point in the history
Co-authored-by: Dina Nimrodi <[email protected]>

Co-authored-by: Dina Nimrodi <[email protected]>
  • Loading branch information
dinal and Dina Nimrodi authored Dec 3, 2020
1 parent b7d3520 commit 61706a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/appender/appender.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ func (mc *MetricsCache) addMetric(hash uint64, name string, metric *MetricState)
// Push append to async channel
func (mc *MetricsCache) appendTV(metric *MetricState, t int64, v interface{}) {
metric.Lock()
defer metric.Unlock()
metric.store.numNotProcessed++
metric.Unlock()
mc.asyncAppendChan <- &asyncAppend{metric: metric, t: t, v: v}
}

Expand Down

0 comments on commit 61706a3

Please sign in to comment.