diff --git a/pkg/receive/multitsdb.go b/pkg/receive/multitsdb.go index e98c15cc78..06d5b90963 100644 --- a/pkg/receive/multitsdb.go +++ b/pkg/receive/multitsdb.go @@ -138,9 +138,6 @@ func NewMultiTSDB( } for _, option := range options { - if option == nil { - continue - } option(mt) } diff --git a/pkg/receive/multitsdb_test.go b/pkg/receive/multitsdb_test.go index 41dda2c2d7..eb1a999c94 100644 --- a/pkg/receive/multitsdb_test.go +++ b/pkg/receive/multitsdb_test.go @@ -53,7 +53,7 @@ func TestMultiTSDB(t *testing.T) { NoLockfile: true, MaxExemplars: 100, EnableExemplarStorage: true, - }, labels.FromStrings("replica", "01"), "tenant_id", nil, false, metadata.NoneFunc, nil) + }, labels.FromStrings("replica", "01"), "tenant_id", nil, false, metadata.NoneFunc) defer func() { testutil.Ok(t, m.Close()) }() testutil.Ok(t, m.Flush()) @@ -137,7 +137,6 @@ func TestMultiTSDB(t *testing.T) { nil, false, metadata.NoneFunc, - nil, ) defer func() { testutil.Ok(t, m.Close()) }() @@ -174,7 +173,7 @@ func TestMultiTSDB(t *testing.T) { MaxBlockDuration: (2 * time.Hour).Milliseconds(), RetentionDuration: (6 * time.Hour).Milliseconds(), NoLockfile: true, - }, labels.FromStrings("replica", "01"), "tenant_id", nil, false, metadata.NoneFunc, nil) + }, labels.FromStrings("replica", "01"), "tenant_id", nil, false, metadata.NoneFunc) defer func() { testutil.Ok(t, m.Close()) }() testutil.Ok(t, m.Flush()) @@ -443,7 +442,6 @@ func TestMultiTSDBPrune(t *testing.T) { test.bucket, false, metadata.NoneFunc, - nil, ) defer func() { testutil.Ok(t, m.Close()) }() @@ -519,7 +517,6 @@ func TestMultiTSDBRecreatePrunedTenant(t *testing.T) { objstore.NewInMemBucket(), false, metadata.NoneFunc, - nil, ) defer func() { testutil.Ok(t, m.Close()) }() @@ -624,7 +621,6 @@ func TestAlignedHeadFlush(t *testing.T) { test.bucket, false, metadata.NoneFunc, - nil, ) defer func() { testutil.Ok(t, m.Close()) }() @@ -701,7 +697,6 @@ func TestMultiTSDBStats(t *testing.T) { nil, false, metadata.NoneFunc, - nil, ) defer func() { testutil.Ok(t, m.Close()) }() @@ -869,7 +864,6 @@ func BenchmarkMultiTSDB(b *testing.B) { nil, false, metadata.NoneFunc, - nil, ) defer func() { testutil.Ok(b, m.Close()) }() diff --git a/pkg/receive/receive_test.go b/pkg/receive/receive_test.go index a8ec25cd3c..1ab909fd5f 100644 --- a/pkg/receive/receive_test.go +++ b/pkg/receive/receive_test.go @@ -8,12 +8,10 @@ import ( "time" "github.com/go-kit/log" - "github.com/stretchr/testify/require" - "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/tsdb" - + "github.com/stretchr/testify/require" "github.com/thanos-io/objstore" "github.com/thanos-io/thanos/pkg/block/metadata" @@ -821,7 +819,6 @@ func initializeMultiTSDB(dir string) *MultiTSDB { bucket, false, metadata.NoneFunc, - nil, ) return m diff --git a/pkg/receive/writer_test.go b/pkg/receive/writer_test.go index f20d85fae2..434512c694 100644 --- a/pkg/receive/writer_test.go +++ b/pkg/receive/writer_test.go @@ -10,8 +10,6 @@ import ( "testing" "time" - "github.com/thanos-io/thanos/pkg/receive/writecapnp" - "github.com/efficientgo/core/testutil" "github.com/go-kit/log" "github.com/pkg/errors" @@ -24,6 +22,7 @@ import ( "github.com/prometheus/prometheus/tsdb/tsdbutil" "github.com/thanos-io/thanos/pkg/block/metadata" + "github.com/thanos-io/thanos/pkg/receive/writecapnp" "github.com/thanos-io/thanos/pkg/runutil" "github.com/thanos-io/thanos/pkg/store/labelpb" "github.com/thanos-io/thanos/pkg/store/storepb/prompb" @@ -416,7 +415,6 @@ func setupMultitsdb(t *testing.T, maxExemplars int64) (log.Logger, *MultiTSDB, A nil, false, metadata.NoneFunc, - nil, ) t.Cleanup(func() { testutil.Ok(t, m.Close()) }) @@ -482,7 +480,6 @@ func benchmarkWriter(b *testing.B, labelsNum int, seriesNum int, generateHistogr nil, false, metadata.NoneFunc, - nil, ) b.Cleanup(func() { testutil.Ok(b, m.Close()) }) diff --git a/pkg/store/types/matcher.go b/pkg/store/types/matcher.go deleted file mode 100644 index b12d2c0459..0000000000 --- a/pkg/store/types/matcher.go +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) The Thanos Authors. -// Licensed under the Apache License 2.0. - -package storetypes