Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Ye <[email protected]>
  • Loading branch information
Ben Ye committed Jun 16, 2022
1 parent 09c8316 commit 2a3cb7c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/thanos/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func (sc *storeConfig) registerFlag(cmd extkingpin.FlagClause) {
Default("32").IntVar(&sc.blockMetaFetchConcurrency)

cmd.Flag("sync-tombstone-duration", "Repeat interval for syncing the tombstones between local and remote view.").
Default("3m").DurationVar(&sc.syncInterval)
Default("3m").DurationVar(&sc.syncTombstonesInterval)

sc.filterConf = &store.FilterConfig{}

Expand Down Expand Up @@ -407,7 +407,7 @@ func runStore(

{
g.Add(func() error {
return runutil.Repeat(time.Minute*3, ctx.Done(), func() error {
return runutil.Repeat(conf.syncTombstonesInterval, ctx.Done(), func() error {
return bs.SyncTombstones(ctx)
})
}, func(error) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/thanos/tools_bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"encoding/csv"
"encoding/json"
"fmt"
"github.com/thanos-io/thanos/pkg/block/tombstone"
"io"
"io/ioutil"
"net/http"
Expand Down Expand Up @@ -46,6 +45,7 @@ import (
v1 "github.com/thanos-io/thanos/pkg/api/blocks"
"github.com/thanos-io/thanos/pkg/block"
"github.com/thanos-io/thanos/pkg/block/metadata"
"github.com/thanos-io/thanos/pkg/block/tombstone"
"github.com/thanos-io/thanos/pkg/compact"
"github.com/thanos-io/thanos/pkg/compact/downsample"
"github.com/thanos-io/thanos/pkg/compactv2"
Expand Down
2 changes: 1 addition & 1 deletion pkg/block/tombstone/tombstone.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"path"
"time"

"github.com/go-kit/kit/log"
"github.com/go-kit/log"
"github.com/oklog/ulid"
"github.com/prometheus/prometheus/model/timestamp"

Expand Down
3 changes: 3 additions & 0 deletions pkg/compact/compact.go
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,9 @@ func (cg *Group) compact(ctx context.Context, dir string, planner Planner, comp
if err != nil {
return false, ulid.ULID{}, retry(errors.Wrapf(err, "download block %s", meta.ULID))
}
bb, err := tsdb.OpenBlock()
bb.Delete()
bb.CleanTombstones()

// Ensure all input blocks are valid.
var stats block.HealthStats
Expand Down

0 comments on commit 2a3cb7c

Please sign in to comment.