-
Notifications
You must be signed in to change notification settings - Fork 755
feat: Update docs to indicate need to use consistent hashing for KV events in backend engines #2981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Update docs to indicate need to use consistent hashing for KV events in backend engines #2981
Conversation
|
👋 Hi qimcis! Thank you for contributing to ai-dynamo/dynamo. Just a reminder: The 🚀 |
690f1a8 to
e9f13fa
Compare
|
Caution Review failedFailed to post review comments. Configuration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (8)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2025-05-29T00:02:35.018ZApplied to files:
🧬 Code graph analysis (2)lib/bindings/python/tests/test_kv_bindings.py (3)
lib/llm/src/kv_router/indexer.rs (1)
🪛 GitHub Actions: Pre Merge Validation of (ai-dynamo/dynamo/refs/pull/2981/merge) by qimcis.lib/bindings/python/tests/test_kv_bindings.py[error] 1-1: isort (pre-commit hook) failed: Import order adjusted in lib/bindings/python/tests/test_kv_bindings.py; file updated automatically. Please commit the changes. ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
WalkthroughAdds deterministic hashing guidance for KV-aware routing across backends; introduces a KV Events & Hashing guide and docs index updates; augments vLLM args to log determinism tips; tightens KV router handling with env-controlled warning/error on missing blocks; and adds Rust/Python tests validating the canonical block-hash vector. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Router
participant KVStore
Client->>Router: KV Event (Stored / Removed)
Router->>KVStore: Lookup parent/block by Engine Block ID
alt Block found
Router->>KVStore: Apply store/remove
Router-->>Client: Ack
else Block missing
Note over Router: Check DYN_KV_ENFORCE_ENGINE_HASH_STABILITY
alt Enforcement enabled ("1"/"true")
Router->>Router: Log ERROR with hint
else Enforcement disabled
Router->>Router: Log WARNING with guidance
end
Router-->>Client: Skip mutation (return early)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Pre-merge checks (3 passed)✅ Passed checks (3 passed)
Poem
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Signed-off-by: Keiven Chang <[email protected]> Signed-off-by: Chi McIsaac <[email protected]>
Signed-off-by: Chi McIsaac <[email protected]>
06d64ce to
385040d
Compare
|
Can you also make some minor updates to |
Signed-off-by: Chi McIsaac <[email protected]>
dbc993b to
c232989
Compare
Signed-off-by: Chi McIsaac <[email protected]>
Signed-off-by: Chi McIsaac <[email protected]>
Signed-off-by: Chi McIsaac <[email protected]>
|
@PeaBrane The env var setting wouldn't work to the best of my knowledge, it should only affect python's built in hash() randomization. I've already removed mention of this in the docs for SGLang! Thanks for reviewing |
Signed-off-by: PeaBrane <[email protected]>
Signed-off-by: PeaBrane <[email protected]>
Signed-off-by: PeaBrane <[email protected]>
Signed-off-by: PeaBrane <[email protected]>
Signed-off-by: PeaBrane <[email protected]>
|
/ok to test 52e76be |
Overview:
Added tests, docs, and runtime enforcement to keep the router’s radix tree consistent.
Details:
lib/llm/src/kv_router/indexer.rscomponents/backends/vllm/src/dynamo/vllm/args.pynow logs guidance when prefix caching is enableddocs/guides/kv_events_hashing.md: Canonical hashing spec (xxh3‑64, seed=1337, LE), reference vector, engine config tips,enforcement.Where should the reviewer start?
docs/guides/kv_events_hashing.mdRelated Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
Summary by CodeRabbit
New Features
Documentation
Tests