mirror of https://github.com/grafana/loki
Prevent GetFactorOfTime from returning NaN (#9602)
`GetFactorOfTime` is used to calculate overlaps with chunk time ranges -- particularly calls to `stats`. When a chunk has only one entry, it's `start time == end time` and this `GetFactorOfTime` returns `NaN`. The stats calculation is `uint64(total chunk bytes * factor)`. When `factor` is `NaN`: `uint64(total chunk bytes * factor) == uint64(math.Nan()) == 9223372036854775808` `uint64(math.Nan()) == 9223372036854775808` is an implementation detail of golang.pull/9615/head
parent
f5872ec4d3
commit
1f119e1356
Loading…
Reference in new issue