From 8b1bafa612c28c693a76dd13cf5f3f573e7b3959 Mon Sep 17 00:00:00 2001 From: Aleksei Semiglazov Date: Wed, 14 Nov 2018 01:22:42 +0000 Subject: [PATCH] downsample: fix postings index Use proper posting index to fetch series data with label set and chunks --- pkg/compact/downsample/streamed_block_writer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/compact/downsample/streamed_block_writer.go b/pkg/compact/downsample/streamed_block_writer.go index c251c5ca15..7ec60ec932 100644 --- a/pkg/compact/downsample/streamed_block_writer.go +++ b/pkg/compact/downsample/streamed_block_writer.go @@ -228,7 +228,7 @@ func (w *StreamedBlockWriter) populateBlock(indexWriter tsdb.IndexWriter) error all := index.NewListPostings(w.postings) for all.Next() { - s := w.series[i] + s := w.series[all.At()] // Skip the series with all deleted chunks. if len(s.chunks) == 0 { level.Info(w.logger).Log("empty chunks", i, s.lset)