Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upRange selector over 16s is broken #3939
Comments
This comment has been minimized.
This comment has been minimized.
|
That smells like an issue with BufferedSeriesIterator. Does the same happen with a 2s interval 32s range? |
This comment has been minimized.
This comment has been minimized.
|
Same thing happens with 2s resolution and 31s or 32s range. |
This comment has been minimized.
This comment has been minimized.
|
16s is working for me, but I'm seeing the issue with 15s. |
This comment has been minimized.
This comment has been minimized.
|
Found the issue, it's in sampleRing.add. When the ring is doubled the value of the local variable |
brian-brazil
added a commit
that referenced
this issue
Mar 9, 2018
brian-brazil
referenced this issue
Mar 9, 2018
Merged
Correctly handle pruning wraparound after ring expansion #3942
This comment has been minimized.
This comment has been minimized.
|
Thanks for the detailed report, #3942 should fix this. |
This comment has been minimized.
This comment has been minimized.
|
Thank you for the quick fix. |
brian-brazil
closed this
in
#3942
Mar 12, 2018
brian-brazil
added a commit
that referenced
this issue
Mar 12, 2018
brian-brazil
added a commit
that referenced
this issue
Mar 14, 2018
sipian
pushed a commit
to sipian/prometheus
that referenced
this issue
May 18, 2018
sipian
pushed a commit
to sipian/prometheus
that referenced
this issue
May 18, 2018
bobmshannon
pushed a commit
to bobmshannon/prometheus
that referenced
this issue
Nov 19, 2018
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 22, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
free commentedMar 9, 2018
Apologies for the weirdly specific and yet vague issue title. Essentially what I see happening is that when a function that takes a range selector (e.g.
rate()) is used in aquery_rangerequest with a range selector of 16s over the start of a series with 1s resolution, it appears as if it will be fed the first 16 points in the series, then (as if those first 16 points suddenly disappeared), the following 1 point, 2 points, 3 points and so on. So essentially the rate graph looks like this:The 17s rate (and most other range values except 15s, 31s, 32s, 61s...) look correct:
What did you do?
Did a
/query_range?query=rate(gen_counter[16s])&step=1over the start of a counter with 1s resolution, incrementing by 1 every second.What did you expect to see?
A smooth increase from 0 to 1 over the first 16 seconds, followed by a flat rate of 1.
What did you see instead? Under which circumstances?
A smooth increase from 0 to 1, followed by a missing value, followed by a smooth increase from 0 to 1, followed by a flat rate of 1.
Environment
System information:
Linux 4.13.0-36-generic x86_64
Prometheus version:
prometheus, version 2.2.0 (branch: HEAD, revision: f63e7db)
build user: root@52af9f66ce71
build date: 20180308-16:40:42
go version: go1.10
Prometheus configuration file:
To reproduce, dump the contents of the config directory in the attached config.tar.gz into a fresh Prometheus 2.2.0 installation, fire up Prometheus, then go to http://localhost:9090/graph?g0.range_input=1m&g0.expr=rate(gen_counter%5B16s%5D)&g0.tab=0&g1.range_input=1h&g1.expr=gen_counter%5B100s%5D&g1.tab=1 and keep refreshing until you get the first half minute of the newly generated series covered by the
rate(gen_counter[16s])graph. I suspect the problem is somewhere inpromql/engine.gobut I couldn't figure out where exactly.