Skip to content

Release 0.6.4 to main (exists→get lookup reuse + L3 prefetch counters) - #23

Merged
flymysql merged 3 commits into
mainfrom
cursor/discovery-poll-logging-49da
Jun 2, 2026
Merged

Release 0.6.4 to main (exists→get lookup reuse + L3 prefetch counters)#23
flymysql merged 3 commits into
mainfrom
cursor/discovery-poll-logging-49da

Conversation

@flymysql

@flymysql flymysql commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Lands the 0.6.4 work on main. PR #22 was merged into this branch (cursor/discovery-poll-logging-49da) rather than main, so main is still at 0.6.3 (which itself was never tagged). This PR fast-forwards main to the v0.6.4 release commit.

Commits over main:

  • perf(store): reuse directory lookup across exists→getbatch_exists primes resident hit locations into a one-shot, short-TTL handoff cache that batch_get consumes, skipping the redundant second directory RPC. New directory_lookups_saved counter.
  • obs(store): count batch_exists probes + pages foundexists_requests / exists_pages_found counters make the SGLang L3 prefetch path observable end to end (distinguishes "never probed" vs "probed but didn't fetch").

Version → 0.6.4 (already tagged v0.6.4; the GitHub Release + PyPI publish run from the tag).

Open in Web Open in Cursor 

cursoragent and others added 3 commits June 2, 2026 04:42
SGLang's HiCache prefetch resolves a prefix in two steps -- batch_exists()
to find the hit length, then batch_get() to pull those pages -- which issued
two directory RPCs for the same keys. batch_exists() now fetches full
locations and primes the resident hit prefix into a one-shot handoff cache;
the imminent batch_get() consumes (pops) them, skipping the second lookup.

Primes are popped on use and short-TTL (1s), so a consumed location is only
ever as stale as the exists->get gap -- always on, never serving a location
older than one prefetch handoff (unlike the opt-in directory_read_cache_ttl).

Adds a directory_lookups_saved counter and a contract test asserting the
get reuses primed locations and re-resolves once they are consumed.

Co-authored-by: 兰州小红鸡 <flyphp@outlook.com>
read_requests==0 alone can't distinguish 'SGLang never probed L3' from
'probed but didn't fetch'. Add exists_requests (batch_exists calls) and
exists_pages_found (pages reported present) so the prefetch path is
observable end to end:
  - exists_requests==0            -> prefetch never reached the backend
  - exists_pages_found==0         -> probing but directory miss (key/shard)
  - found>0 but read_requests==0  -> found, not fetched (local hit/policy)

Co-authored-by: 兰州小红鸡 <flyphp@outlook.com>
…doff-49da

perf+obs(store): reuse exists→get directory lookup; count L3 prefetch probes (0.6.4)
@flymysql
flymysql marked this pull request as ready for review June 2, 2026 06:21
@flymysql
flymysql merged commit 129cbbe into main Jun 2, 2026
12 checks passed
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