mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 00:13:30 +01: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
@ -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 New Issue
Block a user