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

Mimir returns HTTP status 422 in cases where 5xx makes more sense #8139

Open
jkirkwood opened this issue May 14, 2024 · 1 comment
Open

Mimir returns HTTP status 422 in cases where 5xx makes more sense #8139

jkirkwood opened this issue May 14, 2024 · 1 comment
Assignees

Comments

@jkirkwood
Copy link

We often receive a 422 HTTP response from Mimir with the following error message:

{
  "status": "error",
  "errorType": "execution",
  "error": "attempted to read series at index 0 from store-gateway chunks stream, but the stream has failed: rpc error: code = Internal desc = loading chunks: block 01HXN90CNDFJGRBZWY5HK5FMV8: get range reader: fetching range [27712000, 27728000]: Get \"<bucket_url>/<tenant_id>%2F01HXN90CNDFJGRBZWY5HK5FMV8%2Fchunks%2F000011\": http2: client connection force closed via ClientConn.Close"
}

In this case it seems like a 500-level error is more appropriate given this appears to be a server error, and retrying the same query usually works. Many HTTP clients have the ability to retry 5xx-level error codes automatically, so returning the proper status code prevents additional workarounds.

@56quarters
Copy link
Contributor

I'm able to reproduce this locally. It appears to be caused by our error translation code not covering the entire querier hierarchy (queryable -> querier -> series set -> series -> iterator).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants