Skip to content

Bound reader expression caches and isolate dynamic query state - #98

Closed
phillipleblanc wants to merge 2 commits into
spiceai-54from
phillip/bounded-reader-expressions
Closed

phillipleblanc wants to merge 2 commits into
spiceai-54from
phillip/bounded-reader-expressions

Conversation

@phillipleblanc

Copy link
Copy Markdown

WHAT

Bound expression-keyed reader caches and avoid retaining dynamic query state when a Vortex reader is reused across scans.

WHY

Long-lived readers must not accumulate every distinct literal or retain a previous query’s dynamic-filter callbacks.

HOW

Cap six expression caches at 32 entries with clear-on-cap eviction and bypass caching for nested dynamic comparisons; retain literal-independent memos. Two regression tests fail before and pass after, 309 layout/file tests pass, and a disk-file test checks 1,024 literals plus concurrent dynamic-filter updates. Scoped Clippy/formatting and a built Spice runtime’s 12 MSC profile arms pass correctness checks.

This is an independent draft against spiceai-54; runtime validation includes spiceai/spiceai#14149 and spiceai/spiceai#14174. It does not include #96 or #97. No standalone speedup is claimed: closed no-index CPU 8.245 → 8.496 ms, indexed 4.502 → 4.581 ms with p99 unchanged at 65 ms. Entry count is bounded; retained buffer bytes still need separate accounting before long-lived runtime readers are enabled. Detailed local evidence includes exact binary/source identities, raw profiles, 3,000/s arrival results and limits; it is local, not uploaded. No signoff was run, as instructed.

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

1 participant