Skip to content

Commit

Permalink
review fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com>
  • Loading branch information
metonymic-smokey committed Aug 2, 2022
1 parent 0998cdb commit 93c0ab9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cmd/thanos/query.go
Expand Up @@ -161,7 +161,7 @@ func registerQuery(app *extkingpin.App) {
enableMetricMetadataPartialResponse := cmd.Flag("metric-metadata.partial-response", "Enable partial response for metric metadata endpoint. --no-metric-metadata.partial-response for disabling.").
Hidden().Default("true").Bool()

activeQueryDir := cmd.Flag("query.active-query-path", "Directory to log currently active queries in the queries.active file.").Default(".").String()
activeQueryDir := cmd.Flag("query.active-query-path", "Directory to log currently active queries in the queries.active file.").Default("").String()

featureList := cmd.Flag("enable-feature", "Comma separated experimental feature names to enable.The current list of features is "+queryPushdown+".").Default("").Strings()

Expand Down Expand Up @@ -472,8 +472,6 @@ func runQuery(
queryTimeout,
)

queryTracker = promql.NewActiveQueryTracker(activeQueryDir, maxConcurrentQueries, logger)

engineOpts = promql.EngineOpts{
Logger: logger,
Reg: reg,
Expand All @@ -484,12 +482,16 @@ func runQuery(
NoStepSubqueryIntervalFn: func(int64) int64 {
return defaultEvaluationInterval.Milliseconds()
},
ActiveQueryTracker: queryTracker,
EnableNegativeOffset: true,
EnableAtModifier: true,
}
)

if activeQueryDir != "" {
queryTracker := promql.NewActiveQueryTracker(activeQueryDir, maxConcurrentQueries, logger)
engineOpts.ActiveQueryTracker = queryTracker
}

// Periodically update the store set with the addresses we see in our cluster.
{
ctx, cancel := context.WithCancel(context.Background())
Expand Down

0 comments on commit 93c0ab9

Please sign in to comment.