Skip to content

Defer segment source requests until cache misses - #96

Closed
phillipleblanc wants to merge 1 commit into
spiceai-54from
phillip/cache-first-segment-requests
Closed

phillipleblanc wants to merge 1 commit into
spiceai-54from
phillip/cache-first-segment-requests

Conversation

@phillipleblanc

@phillipleblanc phillipleblanc commented Sep 17, 2026 •

Copy link
Copy Markdown

WHAT

Consult the segment cache before creating a source request, so hits and unpolled requests do not register a delegate read. This is a draft experiment with no demonstrated lookup performance benefit; the proposed warm-cache OS-open elimination criterion failed.

WHY

An eager delegate can register work before a cache hit makes it unnecessary.

HOW

Keep miss population and cache-error fallback unchanged; add four regression tests (three fail before the change). All 307 layout/file nextest tests, pinned-toolchain scoped Clippy and formatting pass; built Spice with this exact fork and verified real fixture counts/results, full scans, 64-client profiles and 3,000/s offered profiles.

Paired CPU ms/lookup before → after: no-index 8.068 → 8.332; indexed 4.552 → 4.531; indexed arrival 3.784 → 3.773. Warm read calls and OS-open samples persist. Do not merge for the predicted performance gain.

Detailed local evidence includes exact source/build digests, commands, raw profiles, capture gates and limits; artifacts are retained locally, not uploaded. Runtime validation depends on spiceai/spiceai#14149 and instrumentation spiceai/spiceai#14174; this fork diff has no runtime dependency or machine-local dependency pin. No lab signoff was run, as explicitly instructed.

Create the source request only after a cache miss so warm cache hits and unpolled requests do not enqueue speculative reads.

Signed-off-by: Phillip LeBlanc <879445+phillipleblanc@users.noreply.github.com>
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.

2 participants