WIP: query: prune TSDBInfos in query.remoteEndpoints.Engines()#8599
WIP: query: prune TSDBInfos in query.remoteEndpoints.Engines()#8599SuperPaintman wants to merge 1 commit into
query.remoteEndpoints.Engines()#8599Conversation
Signed-off-by: Aleksandr Krivoshchekov <SuperPaintmanDeveloper@gmail.com>
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