-
Notifications
You must be signed in to change notification settings - Fork 2.2k
WIP: query: prune TSDBInfos in query.remoteEndpoints.Engines()
#8599
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
base: main
Are you sure you want to change the base?
WIP: query: prune TSDBInfos in query.remoteEndpoints.Engines()
#8599
Conversation
Signed-off-by: Aleksandr Krivoshchekov <[email protected]>
query.remoteEndpoints.Engines()query.remoteEndpoints.Engines()
|
Note that this method here has the issue that the remote engine might query data that goes back further then mint of the remote query that we send. Think "last_over_time(X[24h])" - we query at time t but need data for t-24h until t. I think this pruning should probably happen in the engine not here; but idk. |
Of course, I'll account for that in the final implementation. Would queries like these also have an effect on this?
Do you mean in promql-engine repo? That's probably a good idea, but I'm not sure how to prune An optional interface like this (and implement it later for type RemoteEnginePruner interface {
Prune(start, end time.Time) RemoteEngine
}Or we can change the // As a breaking change:
type RemoteEndpoints interface {
Engines(start, end time.Time) []RemoteEngine
}
// Or backward compatible (optional interface):
type PrunedRemoteEndpoints interface {
PrunedEngines(start, end time.Time) []RemoteEngine
}Let me know if you have other ideas. |
Maybe |
|
Moved it to |
Changes
Important
In this implementation we ignore vector operations and offsets in queries. We need to compensate for them before pruning.
Verification
Issue: #8597
CC: @MichaHoffmann