mirror of
https://github.com/prometheus/prometheus.git
synced 2026-06-11 09:30:13 -04:00
Fix data races in WAL replay (#10571)
Signed-off-by: chavacava <salvadorcavadini+github@gmail.com>
This commit is contained in:
parent
ce6a643ee8
commit
0b41fd6e71
2 changed files with 2 additions and 0 deletions
|
|
@ -410,6 +410,7 @@ func (db *DB) loadWAL(r *wal.Reader, multiRef map[chunks.HeadSeriesRef]chunks.He
|
|||
|
||||
go func() {
|
||||
defer close(decoded)
|
||||
var err error
|
||||
for r.Next() {
|
||||
rec := r.Record()
|
||||
switch dec.Type(rec) {
|
||||
|
|
|
|||
|
|
@ -133,6 +133,7 @@ func (h *Head) loadWAL(r *wal.Reader, multiRef map[chunks.HeadSeriesRef]chunks.H
|
|||
|
||||
go func() {
|
||||
defer close(decoded)
|
||||
var err error
|
||||
for r.Next() {
|
||||
rec := r.Record()
|
||||
switch dec.Type(rec) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue