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

Query-frontend should cache errors resulting from data #2676

Closed
bboreham opened this issue Aug 9, 2022 · 0 comments · Fixed by #9028
Closed

Query-frontend should cache errors resulting from data #2676

bboreham opened this issue Aug 9, 2022 · 0 comments · Fixed by #9028
Labels

Comments

@bboreham
Copy link
Contributor

bboreham commented Aug 9, 2022

Is your feature request related to a problem? Please describe.

Suppose you have a dashboard containing a large join query which results in a many-to-many error.
This dashboard is unduly expensive to run - the entire data range is re-fetched on every dashboard update but each time the same error is returned by Mimir.

Describe the solution you'd like

Query-frontend should cache data errors, similarly to how it caches empty results today.
Note that join errors can come and go - if there is only 1 row returned then you won't get a many-to-many error - so we need to cache each query result in time extents, just as with sample results or empty results.

Not all query errors result from data; for example exceeding the chunk limit is something that will clear if the administrator raises the limit. Perhaps we can get round needing to know the difference by a relatively short cache expiry on errors.

Describe alternatives you've considered

Nothing.

56quarters added a commit that referenced this issue Aug 16, 2024
Create a new query-frontend middleware that caches errors returned by
queries if they are non-transient and will fail again if executed again.
This allows us to save work when running a query that hits, e.g., a limit
error: running the query again will not help and is a waste of work.

See #2676

See #7340
56quarters added a commit that referenced this issue Aug 16, 2024
Create a new query-frontend middleware that caches errors returned by
queries if they are non-transient and will fail again if executed again.
This allows us to save work when running a query that hits, e.g., a limit
error: running the query again will not help and is a waste of work.

See #2676

See #7340
56quarters added a commit that referenced this issue Sep 18, 2024
Create a new query-frontend middleware that caches errors returned by
queries if they are non-transient and will fail again if executed again.
This allows us to save work when running a query that hits, e.g., a limit
error: running the query again will not help and is a waste of work.

See #2676

See #7340

Signed-off-by: Nick Pillitteri <[email protected]>
56quarters added a commit that referenced this issue Sep 18, 2024
Create a new query-frontend middleware that caches errors returned by
queries if they are non-transient and will fail again if executed again.
This allows us to save work when running a query that hits, e.g., a limit
error: running the query again will not help and is a waste of work.

See #2676

See #7340

Signed-off-by: Nick Pillitteri <[email protected]>
56quarters added a commit that referenced this issue Sep 18, 2024
Create a new query-frontend middleware that caches errors returned by
queries if they are non-transient and will fail again if executed again.
This allows us to save work when running a query that hits, e.g., a limit
error: running the query again will not help and is a waste of work.

See #2676

See #7340

Signed-off-by: Nick Pillitteri <[email protected]>
56quarters added a commit that referenced this issue Sep 18, 2024
Create a new query-frontend middleware that caches errors returned by
queries if they are non-transient and will fail again if executed again.
This allows us to save work when running a query that hits, e.g., a limit
error: running the query again will not help and is a waste of work.

See #2676

See #7340

Signed-off-by: Nick Pillitteri <[email protected]>
56quarters added a commit that referenced this issue Sep 25, 2024
Create a new query-frontend middleware that caches errors returned by
queries if they are non-transient and will fail again if executed again.
This allows us to save work when running a query that hits, e.g., a limit
error: running the query again will not help and is a waste of work.

See #2676

See #7340

Signed-off-by: Nick Pillitteri <[email protected]>
56quarters added a commit that referenced this issue Sep 25, 2024
* Cache non-transient error responses from the query-frontend

Create a new query-frontend middleware that caches errors returned by
queries if they are non-transient and will fail again if executed again.
This allows us to save work when running a query that hits, e.g., a limit
error: running the query again will not help and is a waste of work.

See #2676

See #7340

Signed-off-by: Nick Pillitteri <[email protected]>

* Set default value for TTL option correctly

Signed-off-by: Nick Pillitteri <[email protected]>

* Code review changes

Signed-off-by: Nick Pillitteri <[email protected]>

---------

Signed-off-by: Nick Pillitteri <[email protected]>
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 a pull request may close this issue.

1 participant