mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-20 07:19:17 +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
b6f22a62cb
commit
0094bc4fc9
@ -481,7 +481,7 @@ func QueryHandler(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