Skip to content

Commit

Permalink
fix: Store.validateArgs wrongfully overwriting start, end unix time (i…
Browse files Browse the repository at this point in the history
…nfluxdata#25146) (influxdata#25165)

When querying data before 1970-01-01 (UNIX time 0)
validateArgs would set start to -in64 max and end to int64 max.

closes influxdata#24669

Co-authored-by: Paul Hegenberg <paul.hegenberg@gmail.com>

closes influxdata#25149
  • Loading branch information
davidby-influx authored and chengshiwen committed Aug 11, 2024
1 parent a972317 commit acc5cb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/storage/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,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
Expand Down

0 comments on commit acc5cb4

Please sign in to comment.