Browse Source

Fix a data race in the loadWAL function caused by reusing the same error var in multiple goroutines (#9259) (#9263)

Signed-off-by: Callum Styan <callumstyan@gmail.com>

Co-authored-by: Callum Styan <callumstyan@gmail.com>
release-2.29
Ganesh Vernekar 3 years ago committed by GitHub
parent
commit
f4c63b9008
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      tsdb/head.go

1
tsdb/head.go

@ -602,6 +602,7 @@ func (h *Head) loadWAL(r *wal.Reader, multiRef map[uint64]uint64, mmappedChunks
wg.Add(1)
exemplarsInput = make(chan record.RefExemplar, 300)
go func(input <-chan record.RefExemplar) {
var err error
defer wg.Done()
for e := range input {
ms := h.series.getByID(e.Ref)

Loading…
Cancel
Save