influxdata / influxdata/influxdb
Query where >= ... doesn't work after 1.8.6, still works after reverting to 1.8.5
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
__Steps to reproduce:__
List the minimal actions needed to reproduce the behavior.
We run following queries:
SELECT "value" FROM "somemeasure" WHERE time <= '2021-06-20T00:00:00.0000000+00:00'
SELECT "value" FROM "somemeasure" WHERE time >= '2021-06-20T00:00:00.0000000+00:00'
In influx 1.8.5 this is the result:

In influx 1.8.6 this is the result:

__Expected behavior:__
I'd expect time filters with an "after" to still work after updating
__Actual behavior:__
Queries with "time after" return no results, not in grafana, and not with influx:8086/query?q=...
__Environment info:__
influx docker image 1.8.5 and 1.8.6
__Logs:__
no significant change between 1.8.6 and 1.8.5:
```
[httpd] 10.255.0.5, 10.0.8.251, 10.0.8.251,10.0.6.98 - admin [06/Jul/2021:09:09:39 +0000] "GET /query?db=MyDBS&epoch=ms&q=SELECT+%22value%22+FROM+%22My.Measure.1%22+WHERE+time+%3C%3D+%272021-06-20T00%3A00%3A00.0000000%2B00%3A00%27%3BSELECT+%22value%22+FROM+%22My.Measure.1%22+WHERE+time+%3E%3D+%272021-06-20T00%3A00%3A00.0000000%2B00%3A00%27 HTTP/1.1" 200 1693699 "-" "Grafana/8.0.4" e4bf9f05-de39-11eb-8008-02420a000665 965895
ts=2021-07-06T09:09:42.818791Z lvl=info msg="Executing query" log_id=0VAlyvTW000 service=query query="SELECT value FROM MyDBS.autogen.\"My.Measure.1\" WHERE time <= '2021-06-20T00:00:00.0000000+00:00'"
ts=2021-07-06T09:09:42.994027Z lvl=info msg="Executing query" log_id=0VAlyvTW000 service=query query="SELECT value FROM MyDBS.autogen.\"My.Measure.1\" WHERE time >= '2021-06-20T00:00:00.0000000+00:00'"
```
Contributor guide
Research direction
Reproduce the two time-filter queries against InfluxDB 1.8.5 and 1.8.6, using the /query endpoint described in the report. Trace how the >= time predicate is handled and compare its result with the <= predicate; done means the after query returns the expected rows after upgrading to 1.8.6.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, grafana, sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100