Skip to content

Fix searcher split cache size boundary#77

Open
rdettai-sk wants to merge 1 commit into
sekoiafrom
fix-split-cache-boundary
Open

Fix searcher split cache size boundary#77
rdettai-sk wants to merge 1 commit into
sekoiafrom
fix-split-cache-boundary

Conversation

@rdettai-sk

@rdettai-sk rdettai-sk commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

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.

Copilot AI review requested due to automatic review settings July 4, 2026 20:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_bytes and newly introduced downloading_bytes in 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_bytes with 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.

Comment thread quickwit/quickwit-storage/src/split_cache/mod.rs
Comment thread quickwit/quickwit-storage/src/split_cache/mod.rs
Comment thread quickwit/quickwit-storage/src/split_cache/split_table.rs Outdated
@rdettai-sk rdettai-sk force-pushed the fix-split-cache-boundary branch from d3fbaf8 to 77dcfa4 Compare July 4, 2026 21:00
@rdettai-sk rdettai-sk requested a review from Darkheir July 4, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants