Repository navigation
feat: add layered KV event indexing for cache-aware routing. - #93
Merged
Merged
Conversation
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: d27f5a3eb0
ℹ️ 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".
Preserve pending recovery deadlines until a snapshot is requested, retire failed index state after unlocking, and cover initial and post-gap recovery under sustained traffic.
PixelFlat
force-pushed
the
feat/static-kv-events
branch
from
October 22, 2026 04:11
55e53a1 to
15611be
Compare
Use the supported string filter so the regression exercises context-path normalization without relying on the pinned minja default filter accepting an omitted fallback. Verify defined filter results for both missing and present input.
liutongxuan
approved these changes
Oct 22, 2026
10 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace the heartbeat/etcd KV cache directory with a background ZMQ consumer for xLLM KV events. The service now discovers eligible registered instances, maintains independent Device and Host residency, and uses that metadata for cache-aware routing without network waits in the request path.
kv_indexermodule with MessagePack decoding, per-instance/DP prefix indexing, bounded buffering, and snapshot recovery after subscription, disconnects, or sequence gaps. Unsynchronized streams contribute no cache benefit. Scheduled recovery is preserved under sustained live traffic, and failed index state is destroyed after releasing its lock.lambda * (1 - kv_hit_ratio) + (1 - lambda) * normalized_queue_cost. Clamp the hit ratio to[0, 1], weight Host-only hits separately, and use the minimum benefit across all DP ranks because routing cannot pin a DP rank. Preserve D load-based selection.GlobalKVCacheMgrand its KV heartbeat/etcd path while preserving instance registration, health/load reporting, and the deprecated heartbeat wire field.Validation
git diff --checkpassed.Scope and limitations
The consumer follows xLLM's current full-snapshot recovery protocol and assumes one model per service cluster. The integration verifies event indexing, layered cache reuse, and routing correctness; it does not assess reduced-model output quality. Existing engine shutdown behavior still required timeout-based cleanup during the integration run.