Skip to content

Commit

Permalink
fix compact: minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
FUSAKLA committed Jul 30, 2019
1 parent 44edd9d commit ed91fdb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions cmd/thanos/compact.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ func (cs compactionSet) maxLevel() int {
}

func registerCompact(m map[string]setupFunc, app *kingpin.Application) {
component := component.Compact
cmd := app.Command(component.String(), "continuously compacts blocks in an object store bucket")
comp := component.Compact
cmd := app.Command(comp.String(), "continuously compacts blocks in an object store bucket")

haltOnError := cmd.Flag("debug.halt-on-error", "Halt the process if a critical compaction error is detected.").
Hidden().Default("true").Bool()
Expand Down Expand Up @@ -113,7 +113,7 @@ func registerCompact(m map[string]setupFunc, app *kingpin.Application) {
compactionConcurrency := cmd.Flag("compact.concurrency", "Number of goroutines to use when compacting groups.").
Default("1").Int()

m[component.String()] = func(g *run.Group, logger log.Logger, reg *prometheus.Registry, tracer opentracing.Tracer, _ bool) error {
m[comp.String()] = func(g *run.Group, logger log.Logger, reg *prometheus.Registry, tracer opentracing.Tracer, _ bool) error {
return runCompact(g, logger, reg,
*httpAddr,
*dataDir,
Expand All @@ -128,7 +128,7 @@ func registerCompact(m map[string]setupFunc, app *kingpin.Application) {
compact.ResolutionLevel5m: time.Duration(*retention5m),
compact.ResolutionLevel1h: time.Duration(*retention1h),
},
component,
comp,
*disableDownsampling,
*maxCompactionLevel,
*blockSyncConcurrency,
Expand Down
2 changes: 1 addition & 1 deletion cmd/thanos/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ func defaultHTTPListener(g *run.Group, logger log.Logger, reg *prometheus.Regist
}

g.Add(func() error {
level.Info(logger).Log("msg", "Listening for metrics", "address", httpBindAddr)
level.Info(logger).Log("msg", "listening for metrics", "address", httpBindAddr)
readinessProber.SetHealthy()
return errors.Wrap(http.Serve(l, mux), "serve metrics")
}, func(err error) {
Expand Down

0 comments on commit ed91fdb

Please sign in to comment.