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

Pass LookbackDelta as query hint to remote read #4192

Closed
mtanda opened this Issue May 24, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@mtanda
Copy link
Contributor

mtanda commented May 24, 2018

Proposal

Related to #4122 .

I'm implementing read adapter.
The read adapter response size could be big, so I reduce size by calculating expected step, and response each datapoints correspond to the step.

Prometheus only accept datapoints in refTime - lookbackDelta.
https://github.com/prometheus/prometheus/blob/v2.2.1/promql/engine.go#L796

refTime is calculated like refTime = startTime x n x interval.
https://github.com/prometheus/prometheus/blob/v2.2.1/promql/engine.go#L402

read adapter need response datapoitns which fit in each time bucket.

But, the start time of query range is affected by lookbackDelta.
https://github.com/prometheus/prometheus/blob/v2.2.1/promql/engine.go#L492
https://github.com/prometheus/prometheus/blob/v2.2.1/promql/engine.go#L476

It is difficult to align data.

If I may misunderstand something, please tell me how I can align the data.

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented May 24, 2018

It's fine to add this, however you don't need to.

For instant vector evaluation all you need to do is return the first sample at or before each step. Watch out for 'offset' though.

@mtanda

This comment has been minimized.

Copy link
Contributor Author

mtanda commented May 25, 2018

Now I understand more detail.
My read adapter inject staleNan to datapoint, so I confuse the behavior related to staleness.
Don't need to pass LookbackDelta, it seems to work without it.
So I close this issue.

Thanks for your help!

@mtanda mtanda closed this May 25, 2018

@lock

This comment has been minimized.

Copy link

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.

@lock lock bot locked and limited conversation to collaborators Mar 22, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.