diff --git a/storage/remote/queue_manager.go b/storage/remote/queue_manager.go index 560a0dc54..9ca4ebcbe 100644 --- a/storage/remote/queue_manager.go +++ b/storage/remote/queue_manager.go @@ -26,7 +26,6 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/gogo/protobuf/proto" - "github.com/golang/snappy" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" @@ -1474,7 +1473,6 @@ func (s *shards) runShard(ctx context.Context, shardID int, queue *queue) { s.sendMinLenSamples(ctx, pendingMinLenData[:n], symbolTable.LabelsData(), nPendingSamples, nPendingExemplars, nPendingHistograms, pBuf, &buf) symbolTable.clear() } - } queue.ReturnForReuse(batch) timer.Reset(time.Duration(s.qm.cfg.BatchSendDeadline)) diff --git a/storage/remote/queue_manager_test.go b/storage/remote/queue_manager_test.go index a72c5c040..55dcdff38 100644 --- a/storage/remote/queue_manager_test.go +++ b/storage/remote/queue_manager_test.go @@ -1433,9 +1433,9 @@ func createDummyTimeSeries(instances int) []timeSeries { b := labels.NewBuilder(commonLabels) b.Set("pod", "prometheus-"+strconv.Itoa(i)) for _, lbls := range metrics { - for _, l := range lbls { + lbls.Range(func(l labels.Label) { b.Set(l.Name, l.Value) - } + }) result = append(result, timeSeries{ seriesLabels: b.Labels(), value: r.Float64(),