Repository navigation
Use Feuer Disk-Cache - #6958
Use Feuer Disk-Cache#6958PSeitz wants to merge 3 commits into
Conversation
Port memory and disk cache integration from Pomsky while preserving upstream search behavior. Update configuration, metrics, documentation, and tests. Validation: 495 config/storage/search library tests passed on macOS; search, serve, and Lambda checks passed. Linux io_uring disk tests remain unverified. Generated with OpenAI gpt-6-astra.
Inline small test suites and consolidate overlapping cases and fixtures without changing production behavior. Validation: make fmt, git diff --check, and 484 config/storage/search library tests passed on macOS. Linux io_uring execution remains unverified. Generated with OpenAI gpt-6-astra.
Pin Feuer's portable zero-disk constructors and remove the direct feuer-memory dependency. Replace the separate fast-field cache with deprecated configuration aliases for memory-only split-range caching. Preserve shared-download cancellation across Feuer's initializer takeover and wait for metadata writes when testing disk recovery. Validation against the Git pin: 475 macOS and 500 Linux config/storage/search library tests passed. Search, serve, and Lambda compile checks, formatting, license generation, and diff checks passed. Generated with OpenAI gpt-6-astra.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0e0e4933f6
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| return Ok(()); | ||
| } | ||
| let _in_flight_guards = object_storage_get_slice_in_flight_guards(buffer.len()); | ||
| default_get_slice_into(self, path, range, buffer).await?; |
There was a problem hiding this comment.
Keep Azure retries around the complete body
When a split-range cache miss on Azure fails after the first response chunk, this call drains the reconstructed reader outside Azure's retry closure. The old get_slice path retries get_to_bytes including download_all, whereas get_slice_stream only retries setup and the first chunk (azure_blob_storage.rs:497-515); with the default storage_timeout_policy: None, a transient mid-body failure now aborts the search instead of using the configured Azure retries. Keep the full body read inside the retry attempt.
Useful? React with 👍 / 👎.
| if let Some(cached_response) = leaf_search_cache | ||
| // TODO remove the clone here. | ||
| .get(split.clone(), search_request.clone()) | ||
| .get_async(split.clone(), search_request.clone()) | ||
| .await |
There was a problem hiding this comment.
Parallelize disk-backed partial-result lookups
When partial_request_cache has a disk tier and a request spans many splits, process_partial_result_cache awaits every Feuer lookup before starting the next one. Disk hits therefore pay the sum of all per-entry I/O latencies, and no uncached split work is scheduled until the whole prepass finishes, so large multi-split searches can consume a substantial part of the request timeout despite Feuer exposing shared concurrent I/O queues. Buffer these lookups concurrently and merge their indexed results afterward.
Useful? React with 👍 / 👎.
| if buffer.is_empty() { | ||
| return Ok(()); | ||
| } | ||
| let mut stream = storage.get_slice_stream(path, range).await?; |
There was a problem hiding this comment.
Preserve GCS metrics in get_slice_into
For GCS, the new default split-range cache eventually reaches this default method on OpendalStorage, so every source read is dispatched through get_slice_stream. The GCS OBJECT_STORAGE_GET_TOTAL increment, in-flight guards, and duration timer exist only in OpendalStorage::get_slice (opendal_storage/base.rs:225-239), while its stream method has none, causing cache-miss GET counts and latency metrics to disappear for GCS searchers. Add a GCS get_slice_into override or preserve the backend accounting around this streamed path.
Useful? React with 👍 / 👎.
| # # Feuer fast-field RAM cache. Default 1G. Omitted while disk_cache | ||
| # # is set disables this cache; set a capacity explicitly to keep both. | ||
| # fast_field_cache_capacity: 1G |
There was a problem hiding this comment.
Align the sample with unified cache semantics
The shipped sample says operators can set fast_field_cache_capacity to keep it alongside disk_cache, but SearcherConfig::resolved_disk_cache rejects any configuration containing both, so following this guidance makes startup fail. The same sample later says omission disables disk_cache, although the resolver creates a 1 GB memory-only split-range cache when both settings are omitted; update these comments (and the matching querying overview) to describe the unified cache behavior documented in node-config.md.
AGENTS.md reference: AGENTS.md:L23-L24
Useful? React with 👍 / 👎.
|
Replaced by #6962, using the intended source branch |
Description
Describe the proposed changes made in this PR.
How was this PR tested?
Describe how you tested this PR.