mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
app/vmselect/prometheus: properly adjust too big time time
on /api/v1/query
Too big `time` must be adjusted to `now()-queryOffset`.
This commit is contained in:
parent
6ca4b94511
commit
5ae47e8940
1 changed files with 1 additions and 1 deletions
|
@ -555,7 +555,7 @@ func QueryHandler(at *auth.Token, w http.ResponseWriter, r *http.Request) error
|
|||
return fmt.Errorf(`too long query; got %d bytes; mustn't exceed %d bytes`, len(query), *maxQueryLen)
|
||||
}
|
||||
if ct-start < queryOffset {
|
||||
start -= queryOffset
|
||||
start = ct - queryOffset
|
||||
}
|
||||
if childQuery, windowStr, offsetStr := promql.IsMetricSelectorWithRollup(query); childQuery != "" {
|
||||
var window int64
|
||||
|
|
Loading…
Reference in a new issue