app/vmselect/prometheus: set start arg in /api/v1/series to the minimum allowed time by default as Prometheus does

Fixes https://github.com/VictoriaMetrics/VictoriaMetrics/issues/91
This commit is contained in:
Aliaksandr Valialkin 2019-07-11 17:10:12 +03:00
parent 54bd21eb4a
commit 62a7353479

View file

@ -309,7 +309,9 @@ func SeriesHandler(w http.ResponseWriter, r *http.Request) error {
if len(matches) == 0 {
return fmt.Errorf("missing `match[]` arg")
}
start, err := getTime(r, "start", ct-defaultStep)
// Set start to minTimeMsecs by default as Prometheus does.
// See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/91
start, err := getTime(r, "start", minTimeMsecs)
if err != nil {
return err
}