Skip to content

Commit

Permalink
Return 429 on ES API when no shards available
Browse files Browse the repository at this point in the history
  • Loading branch information
rdettai committed Nov 27, 2024
1 parent aa600c9 commit 77f2111
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 77f2111

Please sign in to comment.