Skip to content

Commit 568d256

Browse files
committed
Make code compile again
Signed-off-by: Alvin Lin <[email protected]>
1 parent a85ef00 commit 568d256

File tree

5 files changed

+9
-1
lines changed

5 files changed

+9
-1
lines changed

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ require (
1919
github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb
2020
github.com/felixge/fgprof v0.9.1
2121
github.com/fsouza/fake-gcs-server v1.7.0
22+
github.com/go-kit/kit v0.12.0
2223
github.com/go-kit/log v0.2.0
2324
github.com/go-openapi/strfmt v0.21.0
2425
github.com/go-openapi/swag v0.19.15

pkg/compactor/compactor.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ var (
7272
true, // Enable vertical compaction
7373
reg,
7474
blocksMarkedForDeletion,
75+
prometheus.NewCounter(prometheus.CounterOpts{}),
7576
garbageCollectedBlocks,
7677
metadata.NoneFunc,
7778
cfg)

pkg/compactor/shuffle_sharding_grouper.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"github.com/pkg/errors"
1414
"github.com/prometheus/client_golang/prometheus"
1515
"github.com/prometheus/client_golang/prometheus/promauto"
16-
"github.com/prometheus/prometheus/pkg/labels"
16+
"github.com/prometheus/prometheus/model/labels"
1717
"github.com/thanos-io/thanos/pkg/block/metadata"
1818
"github.com/thanos-io/thanos/pkg/compact"
1919
"github.com/thanos-io/thanos/pkg/objstore"
@@ -26,6 +26,7 @@ type ShuffleShardingGrouper struct {
2626
enableVerticalCompaction bool
2727
reg prometheus.Registerer
2828
blocksMarkedForDeletion prometheus.Counter
29+
blocksMarkedForNoCompact prometheus.Counter
2930
garbageCollectedBlocks prometheus.Counter
3031
hashFunc metadata.HashFunc
3132
compactions *prometheus.CounterVec
@@ -43,6 +44,7 @@ func NewShuffleShardingGrouper(
4344
enableVerticalCompaction bool,
4445
reg prometheus.Registerer,
4546
blocksMarkedForDeletion prometheus.Counter,
47+
blocksMarkedForNoCompact prometheus.Counter,
4648
garbageCollectedBlocks prometheus.Counter,
4749
hashFunc metadata.HashFunc,
4850
compactorCfg Config,
@@ -58,6 +60,7 @@ func NewShuffleShardingGrouper(
5860
enableVerticalCompaction: enableVerticalCompaction,
5961
reg: reg,
6062
blocksMarkedForDeletion: blocksMarkedForDeletion,
63+
blocksMarkedForNoCompact: blocksMarkedForNoCompact,
6164
garbageCollectedBlocks: garbageCollectedBlocks,
6265
hashFunc: hashFunc,
6366
// Metrics are copied from Thanos DefaultGrouper constructor
@@ -135,6 +138,7 @@ func (g *ShuffleShardingGrouper) Groups(blocks map[ulid.ULID]*metadata.Meta) (re
135138
g.verticalCompactions.WithLabelValues(groupKey),
136139
g.garbageCollectedBlocks,
137140
g.blocksMarkedForDeletion,
141+
g.blocksMarkedForNoCompact,
138142
g.hashFunc,
139143
)
140144
if err != nil {

pkg/compactor/shuffle_sharding_grouper_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ func TestShuffleShardingGrouper_Groups(t *testing.T) {
149149
prometheus.NewRegistry(),
150150
nil,
151151
nil,
152+
nil,
152153
metadata.NoneFunc,
153154
*compactorCfg)
154155
actual, err := g.Groups(testData.blocks)

vendor/modules.txt

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)