quickwit-oss / quickwit-oss/quickwit
ingest: persistent 503s after non-graceful scale-down of indexers
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 11.7k
- Forks
- 597
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 37
Description
Describe the bug
When one or more indexer nodes are removed from the cluster without going through the Retiring state (e.g., abrupt pod termination in Kubernetes), their ingest shards remain marked as Open in the metastore indefinitely.
This causes persistent 503 / NoShardsAvailable errors on all ingest requests for the affected indexes until the index is deleted and recreated.
Steps to reproduce (if applicable)
- Create an index with an ingest source
- Start ingesting
- Scale up indexers, then scale them back down abruptly (kill pods, no graceful drain)
- All ingest requests for the index return 503
- Restarting the whole cluster doesn't help (dead shards are reloaded from metastore)
- Only deleting and recreating the index restores ingestion
Root cause
Two compounding issues:
- Control plane —
compute_shards_to_rebalanceonly handles shards on Retiring ingesters. Shards whose leader is completely absent from the ingester pool (node removed without draining) are silently skipped. No replacement shard is ever opened. - Router — when pick_node returns None because all routing-table entries point to dead ingesters (not in pool), the router records NoShardsAvailable which does not add the dead nodes to unavailable_leaders. So the control plane is never told the leaders are unreachable and never opens new shards.
Expected behavior
Reshard lead
Configuration:
Quickwit edge tag quickwit:edge@sha256:fd88ac3e41148a13ba16f722d6855fd626de516663f63ded4b624b2cd74d0d47
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 compute_shards_to_rebalance in the control plane and pick_node plus unavailable_leaders in the router. Follow how absent ingester leaders are represented in the routing table and metastore, then verify the reshard path after abrupt node removal. Done means ingestion recovers without deleting and recreating the index.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100