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

step align start and end time of the original query while splitting it #5217

Merged

Conversation

sandeepsukhani
Copy link
Contributor

What this PR does / why we need it:
In PR #5181, we made a change to step align query splits by step interval except for the start time of the first query and end time of the last query. When the step alignment is disabled, we see a small gap in graphs between the first and second query split since the start time of the query is not step aligned while the next query is.

This PR changes the code to step align all the query splits, including the start and end time of the first and last split.

I will open a follow-up PR to deprecate the step align flag, which does not add much value.

Special notes for your reviewer:
Queries with step > query split interval are splitter by step. These queries' start and end times are kept the same as the original query and are not step aligned since each query split anyways has a single step, so they do not see any gaps. We could do the same for these queries as well, but they are not too common, we on average, see ~1% of this kind of query out of all the range metric queries we get in our biggest cluster.

Checklist

  • Tests updated

Copy link
Contributor

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM I think we should do it too for when step >= split interval

@sandeepsukhani sandeepsukhani merged commit cd1537d into grafana:main Jan 24, 2022
sandeepsukhani added a commit that referenced this pull request Jan 26, 2022
#5217)

* step align start and end time of the original query while splitting it

* also step align queries with step > split interval
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants