Fix searcher split cache size boundary#77
Open
rdettai-sk wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR tightens the searcher split cache quota enforcement by accounting for bytes of in-progress split downloads (not just bytes already present on disk), preventing multiple concurrent large downloads from overshooting the configured cache size limit.
Changes:
- Track and enforce cache byte limits using both
on_disk_bytesand newly introduceddownloading_bytesin the split cache table. - Plumb split file sizes (
num_bytes) through split reporting (proto + uploader) and through the search path so the cache can reserve/attribute download sizes. - Make the storage cache wrapper split-scoped (per split id) so it can reliably associate
num_byteswith the accessed split.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| quickwit/quickwit-storage/src/split_cache/split_table.rs | Adds download-size tracking (downloading_bytes) and includes downloading splits in limit checks; updates APIs to carry split size. |
| quickwit/quickwit-storage/src/split_cache/mod.rs | Updates cache wrapping to be split-scoped and threads split id + size into cache lookups and split table updates. |
| quickwit/quickwit-storage/src/split_cache/download_task.rs | Adjusts CandidateSplit destructuring for the new num_bytes field. |
| quickwit/quickwit-search/src/leaf.rs | Passes split id + computed split size into split-cache storage wrapping. |
| quickwit/quickwit-proto/src/codegen/quickwit/quickwit.search.rs | Adds num_bytes to ReportSplit (generated code). |
| quickwit/quickwit-proto/protos/quickwit/search.proto | Extends ReportSplit message with num_bytes field. |
| quickwit/quickwit-indexing/src/actors/uploader.rs | Populates ReportSplit.num_bytes from split footer offsets. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d3fbaf8 to
77dcfa4
Compare
Darkheir
approved these changes
Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
We have had some issues where the searchers where concurrently downloading a couple of very big splits, exceeding the stores size limit by a lot. This PR prevents this by counting the currently downloaded split sizes against the quota.
This PR also requires indexers to be rolled to be fully operational as those also send notifications about downloadable splits to searchers.
How was this PR tested?
Only unit tests.