quickwit-oss / quickwit-oss/quickwit
Revisit global retry strategy
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 11.7k
- Forks
- 597
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 37
Description
Meta
- There a multiple layers where we want to retry failed requests:
- storage
- metastore
- gRPC
-
For requests with no latency constraints, we want to use retry strategies that maximize the chances that one attempt succeeds after a few seconds or even minutes and minimize retry storms. An example of such a case is an indexer uploading a split that was just merged.
-
For requests with latency constraints, we want to use retry strategies that are maybe more aggressive and fail fast (after a few seconds). An example of such a case is a root node sending a search request to a leaf node. Usually, those requests exist to satisfy the demand of a human at the top of the "request tree".
-
For each failure, we need to be able to distinguish transient errors from permanent faults. Otherwise, we can't possibly decide which requests to retry.
Identified problems with the current state of retries in Quickwit
- We use a single policy at the storage layer to handle both kinds of requests.
- The metastore layer lacks retry logic (at least for the PostgreSQL implementation).
- Our return types do not always encode which components are failing and whether the errors are retryable.
- Part of our current retry logic is untested.
The solution
Racking my brain for a complete proposal but addressing some of the above-mentioned points would be a good start :)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing retry handling through the storage, metastore PostgreSQL, and gRPC layers, then inspect the return types and existing retry tests. This issue is complete only after the retry strategy, transient-versus-permanent error handling, and missing test coverage have been defined and agreed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- grpc, postgresql, rust
- Domain
- backend-api-design, databases, distributed-systems
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100