query: prepare remoteEndpoints for remote engine pruning#8653
Open
SuperPaintman wants to merge 2 commits intothanos-io:mainfrom
Open
query: prepare remoteEndpoints for remote engine pruning#8653SuperPaintman wants to merge 2 commits intothanos-io:mainfrom
remoteEndpoints for remote engine pruning#8653SuperPaintman wants to merge 2 commits intothanos-io:mainfrom
Conversation
Signed-off-by: Aleksandr Krivoshchekov <SuperPaintmanDeveloper@gmail.com>
Signed-off-by: Aleksandr Krivoshchekov <SuperPaintmanDeveloper@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
This PR updates
query.remoteEndpoints.Engines()method to satisfy the updatedRemoteEndpointsinterface (thanos-io/promql-engine#680):type RemoteEndpoints interface { - Engines() []RemoteEngine + Engines(mint, maxt int64) []RemoteEngine }Now
RemoteEndpoints.Engines()acceptsmintandmaxtparameters (min and max timestamp that any selector in the query can read). We will use these parameters later to prune TSDBInfos inquery.remoteEndpoints(more context here: #8597).Note 1:
This PR doesn't change the actual
remoteEndpointsimplementation. It only updates the method signature.The
mintandmaxtparams are safe to ignore,promql-enginecan handle "un-pruned" engines.Note 2:
I've temporarily replaced
github.com/thanos-io/promql-engine(ingo.mod) with my fork. I'll remove it once thanos-io/promql-engine#680 is merged.Verification
RemoteEndpointsinterface to support remote engines pruning promql-engine#680.Issue: #8597
CC: @MichaHoffmann , @fpetkovski