-
Notifications
You must be signed in to change notification settings - Fork 56
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
Support long range _over_time functions for distributed execution. #195
Comments
Be careful with (2) because you might run into grafana/mimir#2599. Not sure what would be a good way to solve that. |
Thanks for pointing me to that issue! The catch might be to always have an overlap of one step. So instead of having (3 - 1 + 41 - 40) / 120 as in their example, we can try (3 - 1 + 41 - 3) / 120. |
Mhm, it sounds like that could work! It will complicate the implementation, of course, but it should solve that issue. Perhaps it would also be cool to implement this in a way so that we could have instant query sharding in the engine in the future easily. |
Hey @fpetkovski can I work on this issue ? |
one possible way to implement the first approach is to increase the start time by the select range using Finally, we return the result for the current engine |
Hi @nishchay-veer, this is a possible solution and it is already implemented in #246. Feel free to review that PR and leave comments if you have any. |
Which one is a better approach according to you, just being curious? |
Queries like
sum_over_time[1d]
can be challenging to distribute since one engine might not have a large range to calculate the result for a given step. For example, this exact query against Prometheus with a 6h retention will produce incorrect results.I can think of two ways we can address this problem:
5m
), we can increase the start time in each engine by that amount. This will make sure the window for the first few steps for that engine has enough samples to produce a correct result. The values for the steps that were skipped would have to be calculated from an older engine._over_time
/rate
functions. Maybe they can be transformed into something likesimilar to how subqueries work.
The text was updated successfully, but these errors were encountered: