Skip to content

Commit

Permalink
Reorder chunkEncDataLen components
Browse files Browse the repository at this point in the history
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
  • Loading branch information
dimitarvdimitrov committed May 15, 2023
1 parent 645844a commit ef21749
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/storegateway/bucket_chunk_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func (r *bucketChunkReader) loadChunks(ctx context.Context, res []seriesChunks,
return errors.Wrap(err, "parsing chunk length")
}
// We ignore the crc32 after the chunk data.
chunkEncDataLen := int(chunkDataLen) + chunks.ChunkEncodingSize
chunkEncDataLen := chunks.ChunkEncodingSize + int(chunkDataLen)
cb := chunksPool.Get(chunkEncDataLen)

fullyRead, err := io.ReadFull(reader, cb)
Expand Down

0 comments on commit ef21749

Please sign in to comment.