From c4bfaa895417c174cef76f5308eebb6aaddbfa36 Mon Sep 17 00:00:00 2001 From: davidby-influx <72418212+davidby-influx@users.noreply.github.com> Date: Tue, 16 Jul 2024 08:35:17 -0700 Subject: [PATCH] fix: Store.validateArgs wrongfully overwriting start, end unix time (#25146) (#25165) When querying data before 1970-01-01 (UNIX time 0) validateArgs would set start to -in64 max and end to int64 max. closes https://github.com/influxdata/influxdb/issues/24669 Co-authored-by: Paul Hegenberg closes https://github.com/influxdata/influxdb/issues/25149 --- services/storage/store.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/storage/store.go b/services/storage/store.go index fe91b361e00..80342ee0bfe 100644 --- a/services/storage/store.go +++ b/services/storage/store.go @@ -100,10 +100,10 @@ func (s *Store) validateArgs(database, rp string, start, end int64) (string, str return "", "", 0, 0, errors.New("invalid retention policy") } - if start <= 0 { + if start <= models.MinNanoTime { start = models.MinNanoTime } - if end <= 0 { + if end >= models.MaxNanoTime { end = models.MaxNanoTime } return database, rp, start, end, nil