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
Query frontend: large step queries are shifted #3353
Comments
Hello, thanks for the issue. |
Hello thanks for your reply :-)
I use in-memory cache but when I disable it I've exactly the same behavior. |
OK. After checking the code I think this is caused by the step align middleware. It re-calculates the start and end time based on your step so that the requests can be better cached. So the start time of your last query becomes |
Yes, the shift is related to your step as pointed out in the code. So if you want to do a range query for 7d, then why do you use such a large step value? For a standard 7d query, the step should be 2419s which is 40m. What's your use case of using 86400s (1d) as your resolution? |
But anyway, if this step alignment is not what you want, as it returns more data than expected, then we can provide a flag to disable this middleware. Users can make their choice to choose whether they want to disable this or not because the cacheability will be impacted without this middleware. Does this sound good to you? |
Actually I'm embedding those graphs (this is not this query but anyway) in a webapp with a JS lib for graphing which consumes more CPU to each point to plot :-/ and my client doesn't want a good definition but 1 point per day for a month and 1 point every 6 hours for a week. |
Thanks, I will open a pr soon. |
Many thanks :-) |
Agree, let's expose it. Thanks, Ben and @darkweaver87 for investigation 👍 |
Thanos, Prometheus and Golang version used:
thanos, version 0.15.0 (branch: HEAD, revision: fbd14b4)
build user: circleci@b18149728583
build date: 20200907-09:47:14
go version: go1.14.2
(docker image: quay.io/thanos/thanos:v0.15.0)
prometheus: prom/prometheus:v2.20.1
Object Storage Provider:
s3
What happened:
When I use large step on queries, points are shifted.
Examples using with:
Then with larger step:
What you expected to happen:
I would expect to have the same answers between queries on thanos query and query frontend :-)
How to reproduce it (as minimally and precisely as possible):
cf. queries above
Full logs to relevant components:
Anything else we need to know:
Many thanks :-)
The text was updated successfully, but these errors were encountered: