influxdata / influxdata/influxdb
InfluxDB showing values for a timestamp only when a particular time range is selected
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
InfluxDB query shows non_negative_derivative value for a timestamp only when a particular time range is selected.
Eg: start_time = 19 March 2021 01:41:52 UTC ; end_time = 19 March 2021 01:43:20 UTC ; timestamp = 1616118120000000000 shows non-zero value
```
SELECT non_negative_derivative(max("http_response.5xx"), 10s) FROM "haproxy" WHERE "host" =~ /host_name/ AND "proxy" = 'proxy_name' AND time > 1616118112000ms and time < 1616118200000ms GROUP BY time(10s), "proxy";
name: haproxy
tags: proxy=proxy_name
time non_negative_derivative
---- -----------------------
1616118120000000000 2113
1616118130000000000 0
1616118140000000000 0
1616118150000000000 0
1616118160000000000 0
1616118170000000000 0
1616118180000000000 0
1616118190000000000 0
```
When a slightly earlier start_time (2s) is selected, the same timestamp shows zero value.
Eg: start_time = 19 March 2021 01:41:50 UTC ; end_time = 19 March 2021 01:43:20 UTC ; timestamp = 1616118120000000000 shows zero value
```
SELECT non_negative_derivative(max("http_response.5xx"), 10s) FROM "haproxy" WHERE "host" =~ /^p-allocation-service-haproxy/ AND "proxy" = 'allocation_service' AND time > 1616118110000ms and time < 1616118200000ms GROUP BY time(10s), "proxy";
name: haproxy
tags: proxy=allocation_service
time non_negative_derivative
---- -----------------------
1616118120000000000 0
1616118130000000000 0
1616118140000000000 0
1616118150000000000 0
1616118160000000000 0
1616118170000000000 0
1616118180000000000 0
1616118190000000000 0
```
The logs corresponding to this metric do not show any 5xx during this time range. Hence, not sure of how the value spiked up to `2113`.
Any idea on when this kind of behaviour will be exhibited?
**Environment Info:**
VM: Ubuntu 16.04.3
InfluxDB version: 1.4.2
Contributor guide
Research direction
Reproduce both InfluxDB queries on the reported 1.4.2 environment, changing only the start time, and compare the derivative output at timestamp 1616118120000000000. Trace the query and non_negative_derivative behavior involved; done means explaining the discrepancy and providing a regression test or clearly documented expected behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ubuntu
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100