Skip to content

Commit

Permalink
Return 429 on ES API when no shards available (#5566)
Browse files Browse the repository at this point in the history
  • Loading branch information
rdettai authored Nov 28, 2024
1 parent f9dbc5e commit 5329379
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions quickwit/quickwit-serve/src/elasticsearch_api/bulk_v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,11 @@ fn make_elastic_bulk_response_v2(
format!("shard rate limiting [{}]", failure.index_id),
StatusCode::TOO_MANY_REQUESTS,
),
IngestFailureReason::NoShardsAvailable => (
ElasticException::RateLimited,
format!("no shards available [{}]", failure.index_id),
StatusCode::TOO_MANY_REQUESTS,
),
reason => {
let pretty_reason = reason
.as_str_name()
Expand Down

0 comments on commit 5329379

Please sign in to comment.