You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(cache/exchange): conditional revalidation (304) for streaming + LATERAL
Wire the producer cache's conditional-revalidation flow to the streaming table-in-out
(M1) and correlated-LATERAL (M2) exchange operators, both transports. A worker can now
advertise the always-revalidate contract (ttl=0 + etag + revalidatable) on exchange
output: the entry is stored immediately-stale (memory-only), and a repeat scan confirms
freshness with a cheap 0-row not_modified reply instead of recomputing.
- Operators: probe LookupForRevalidation FIRST (plain Lookup evicts a stale entry); if
the entry is >= vgi_result_cache_revalidate_min_bytes, arm the exchange via
SetConditionalRequest. After ReadDataBatch, a 0-row not_modified reply slides the
entry's TTL (SlideRevalidatedExchangeEntry) and serves the stored bytes
(result_cache.revalidate outcome=not_modified); a fresh reply recaptures.
- Connection: FunctionConnection::WriteInputBatch now attaches the
vgi.cache.if_none_match/if_modified_since validators to the exchange input batch's
metadata (the HTTP path already did via SerializeBatchWithState).
- StoreExchangeMemoEntry accepts the always-revalidate (ttl=0 + etag + revalidatable)
entry, storing it immediately-stale + memory-only (LookupForRevalidation probes memory;
a disk immediately-stale blob is un-loadable). SlideRevalidatedExchangeEntry keeps an
always-revalidate entry immediately-stale on slide (doesn't fall to a positive default).
NOT wired for buffered (M3): its combine/finalize request model (key known only at
Finalize) doesn't fit the per-unit validator flow — documented follow-up.
Test: cache/exchange_revalidate.test (both transports, 45 assertions — M1 + M2 304). Full
cache suite green (916 assertions); function_registration 132 -> 134.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XZMDnzigtwqubFrqbP8JEE
0 commit comments