Skip to content

Commit

Permalink
fix: Read full buffer from storage when fetching a range (#13948)
Browse files Browse the repository at this point in the history
  • Loading branch information
benclive authored Aug 22, 2024
1 parent d43b2de commit 115fef4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/querier-rf1/wal/chunks.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package wal

import (
"context"
"errors"
"fmt"
"io"
"sort"
Expand Down Expand Up @@ -316,8 +315,8 @@ func readChunkData(ctx context.Context, storage BlockStorage, chunk ChunkData) (
defer reader.Close()

data := make([]byte, size)
_, err = reader.Read(data)
if err != nil && !errors.Is(err, io.EOF) {
_, err = io.ReadFull(reader, data)
if err != nil {
return nil, fmt.Errorf("could not read socket for %s: %w", chunk.id, err)
}

Expand Down

0 comments on commit 115fef4

Please sign in to comment.