Hello,
I’m facing wired behavior of range() function.
My environment is Linux, docker image influxdb:2. Influx files are mounted to the file system of my machine.
influxd version
InfluxDB v2.7.6 (git: 3c58c06206) build_date: 2024-04-12T21:51:21Z
After playing with my data I started catching strange output of my queries. I reduced the scope of the problem as I could.
I insert only one record:
spot opening_price=123 1717372800000000000
Then I’m trying to query it.
Works as expected - returns one record:
from(bucket: "market-dev")
|> range(start: -101d)
|> filter(fn: (r) => r["_measurement"] == "spot")
Here is problem starts.
Returns nothing (I changed only start from 101 to 102):
from(bucket: "market-dev")
|> range(start: -102d)
|> filter(fn: (r) => r["_measurement"] == "spot")
Returns nothing (I changed only start to 0):
from(bucket: "market-dev")
|> range(start: 0)
|> filter(fn: (r) => r["_measurement"] == "spot")
I made some investigation and here is what I get.
If I change the field name from opening_price to opening_price1 all the previous queries work as expected.
Also when I change the value from number (int or float) to string it also starts working.
Docker container restart does not help.
Seems there is something cached or data is corrupted but I have no idea how to figure out.