Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.9.5-nightly-952f1d5] last point is always 0 #4282

Closed
ecables opened this issue Sep 30, 2015 · 6 comments
Closed

[0.9.5-nightly-952f1d5] last point is always 0 #4282

ecables opened this issue Sep 30, 2015 · 6 comments

Comments

@ecables
Copy link

ecables commented Sep 30, 2015

I use Grafana to visualize data in InfluxDB. Often times data hasn't been fully collected in the current minute, so we use time picker offsets, such as -1m or -2m to represent all but the last minute, or last two minutes, in our query.

What I'm finding, is that periodically InfluxDB returns the last point as 0, always, regardless of if data exists. This is represented in the screen recording below. In the recording I am modifying the query to be now() - 1m, now() - 2m, now() -3m, and so on. You can see that the last point is always zero, even if the previous query returned data for that time period.

Sample queries:
SELECT sum(value) FROM db.rp.measurement WHERE tag =~ /.*/ AND time > now() - 15m AND time < now() - 1m GROUP BY time(1m) fill(0)
SELECT sum(value) FROM db.rp.measurement WHERE tag =~ /.*/ AND time > now() - 15m AND time < now() - 2m GROUP BY time(1m) fill(0)
SELECT sum(value) FROM db.rp.measurement WHERE tag =~ /.*/ AND time > now() - 15m AND time < now() - 3m GROUP BY time(1m) fill(0)

always-zero

@ecables
Copy link
Author

ecables commented Oct 1, 2015

What's interesting is when the last point populates with a value, the first point in the query becomes 0.

The below was generated by repeatedly issuing the following example query beginning at 55s into the minute, through 5s into the next minute:
SELECT sum(value) FROM db.rp.measurement WHERE tag =~ /.*/ AND time > now() - 15m AND time < now() - 2m GROUP BY time(1m) fill(0)

more-zero

@beckettsean
Copy link
Contributor

Sounds very similar to #3926, although in that issue the first or last value were null, not zero.

@beckettsean
Copy link
Contributor

However, in this case there's a fill(0) in effect, so I'm guessing this is a recurrence of #3926, although that was fixed by #4038.

@corylanou you fixed the last issue, thoughts on this one?

@ecables
Copy link
Author

ecables commented Oct 1, 2015

Here's the output when I remove fill(0).

screen shot 2015-10-01 at 3 38 47 pm

And ...

screen shot 2015-10-01 at 3 40 01 pm

@beckettsean
Copy link
Contributor

Thanks, @ecables.

@corylanou this looks like a regression of #3926 in the latest 0.9.5 nightlies.

@jsternberg
Copy link
Contributor

The query engine has had a complete refactor since this issue and I don't think it's relevant anymore. If the issue exists in the latest version, it might be fixed by #6222.

I'm going to close this since it's targeting the old query engine. Please reopen if this is still an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants