Skip to content

Commit

Permalink
API ensure timescale step >= metric resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
alpinskiy committed Jan 15, 2025
1 parent e0bd51c commit 43c4135
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions internal/data_model/timescale.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,14 +322,10 @@ func GetTimescale(args GetTimescaleArgs) (Timescale, error) {
// generate LODs
var minStep int64
pointQuery := args.Mode == PointQuery
if pointQuery {
if pointQuery || args.Step < maxMetricRes {
minStep = maxMetricRes
} else {
if 0 < args.Step {
minStep = args.Step
} else {
minStep = maxMetricRes
}
minStep = args.Step
}
start := args.Start - int64(maxOffset)
end := args.End - int64(maxOffset)
Expand Down

0 comments on commit 43c4135

Please sign in to comment.