Use a trivial solution to #1605
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
This commit is contained in:
parent
e061dfae88
commit
dc819ceb1b
|
@ -1682,13 +1682,13 @@ func makeNativeExemplars(ttl time.Duration, maxCount int) nativeExemplars {
|
|||
}
|
||||
|
||||
func (n *nativeExemplars) addExemplar(e *dto.Exemplar) {
|
||||
n.Lock()
|
||||
defer n.Unlock()
|
||||
|
||||
if cap(n.exemplars) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
n.Lock()
|
||||
defer n.Unlock()
|
||||
|
||||
// The index where to insert the new exemplar.
|
||||
var nIdx int = -1
|
||||
|
||||
|
|
Loading…
Reference in New Issue