Skip to content

feat(storage): open Foyer split range cache - #6702

Open
congx4 wants to merge 2 commits into
quickwit-oss:congxie/split-range-cache-3-keyfrom
congx4:congxie/split-range-cache-4-builder
Open

feat(storage): open Foyer split range cache#6702
congx4 wants to merge 2 commits into
quickwit-oss:congxie/split-range-cache-3-keyfrom
congx4:congxie/split-range-cache-4-builder

Conversation

@congx4

@congx4 congx4 commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add FoyerSplitRangeCache::open / close to build a process-wide Foyer hybrid cache from SplitRangeDiskCacheConfig.

Stack

Test plan

  • cargo test -p quickwit-storage --features testsuite split_range_cache
  • cargo clippy -p quickwit-storage --features testsuite --tests -- -D warnings
  • CI

@congx4
congx4 requested a review from a team as a code owner August 17, 2026 20:54

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a50bb32fbb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}

pub(crate) fn foyer_flush_on_close(policy: SplitRangeCacheWritePolicy) -> bool {
matches!(policy, SplitRangeCacheWritePolicy::WriteOnInsertion)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Enable flush-on-close for write-on-eviction

With the default WriteOnEviction policy, entries are not written to disk until they leave the memory cache, so returning false here causes a graceful close() to discard every still-resident entry instead of making it recoverable on the next open(). Conversely, write-on-insertion entries are already submitted to storage. This pairing should be inverted so normal restarts preserve the hot portion of the default cache.

Useful? React with 👍 / 👎.

congx4 added 2 commits August 18, 2026 13:58
Add FoyerSplitRangeCache::open/close so a process-wide hybrid cache can be built from SplitRangeDiskCacheConfig, including write policy, recovery, and compression.
Write-on-eviction keeps hot entries in memory until close, so flush them then. Write-on-insertion already persisted those entries.
@congx4
congx4 force-pushed the congxie/split-range-cache-4-builder branch from 94c1743 to fa55d6f Compare August 18, 2026 17:59
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.

1 participant