Skip to content

events.duration() fails after 1000 rows #22831

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

Closed
Ogoku opened this issue Nov 5, 2021 · 2 comments
Closed

events.duration() fails after 1000 rows #22831

Ogoku opened this issue Nov 5, 2021 · 2 comments

Comments

@Ogoku
Copy link

Ogoku commented Nov 5, 2021

Hi all and @tomhollingworth,

I have a strange behaviour using events.duration( )

Every 1000th row events.duration(unit: 1m, stopColumn: "_stop" ) is not calculating current row with the next one. Instead it is calculating the differences to the given stop time.

image
(1222min ~20h which is _time to _stop)

When I export my query via csv I can see that every 1000th entry the result ist _time to _stop.

Steps to reproduce:
Whole query:

`
import "contrib/tomhollingworth/events"

from(bucket: "statistik_daten")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "opc_ua_mes_2")
|> filter(fn: (r) => r["maschinen_name"] == "${Maschinen_Name}")
|> events.duration(unit: 1ms, stopColumn: "_stop" )
`

Read more than 1000 entries

Expected behavior:
Except the last row, events.Duration() should always calculates the difference between current record with the next one

Actual behavior:
After 1000 rows events.Duration() calculates difference between current record and _stop value

Environment info:
Running on a Windows OS

  • InfluxDB version: InfluxDB 2.0.7 (git: 2a45f0c) build_date: 2021-06-04T19:17:40Z
@williamhbaker
Copy link
Contributor

This should be fixed by influxdata/flux#4064 with flux v0.139.0. This version of flux will go out with our next minor release, influxdb 2.1, which should be coming out in a few days. Would you be able to upgrade to 2.1 when it's available? If so it would be nice to see if the bug you are seeing is indeed fixed with the latest version of flux.

@Ogoku
Copy link
Author

Ogoku commented Nov 9, 2021

Hey @wbaker85. Updated Influxdb to 2.1 this morning. Problem solved!

@Ogoku Ogoku closed this as completed Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants