refactor: Update BlockStored KVEvent#237
Merged
github-actions[bot] merged 5 commits intoJan 3, 2026
Merged
Conversation
Signed-off-by: Sage Ahrac <sagiahrak@gmail.com>
Signed-off-by: Sage Ahrac <sagiahrak@gmail.com>
Signed-off-by: Sage Ahrac <sagiahrak@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the BlockStored KVEvent to include a new LoraName field and improves backward compatibility by extracting event unmarshalling logic into a dedicated function. The changes enable handling of events with varying field counts while maintaining compatibility with older event formats.
- Added
LoraNamefield toBlockStoredstruct - Extracted unmarshalling logic into
unmarshalKVEventfunction for better maintainability and testability - Added comprehensive backward compatibility tests
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| pkg/kvcache/kvevents/events.go | Added LoraName field to BlockStored struct, created unmarshalKVEvent function with manual field mapping to support backward compatibility |
| pkg/kvcache/kvevents/pool.go | Refactored processEvent to use the new unmarshalKVEvent function instead of inline unmarshalling logic |
| pkg/kvcache/kvevents/process_event_test.go | Added tests for backward compatibility scenarios (missing Medium and LoraName, missing only LoraName, all fields present) and error cases |
| examples/helper/events.go | Updated example to include Medium field when creating BlockStored events |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Sage Ahrac <sagiahrak@gmail.com>
Signed-off-by: Sage Ahrac <sagiahrak@gmail.com>
f0e3ab1 to
ecd5d65
Compare
Collaborator
Author
|
/hold |
Collaborator
Author
|
/hold cancel |
Collaborator
Author
Member
guygir
pushed a commit
to guygir/llm-d-kv-cache-manager
that referenced
this pull request
Apr 20, 2026
…m-d#237) Simplifies the configuration structure of the prefix-cache-scorer plugin by unifying all mode-specific parameters into a single configuration type. The prefix-cache-scorer now supports a mode option: - When set to estimate (the default), it uses the GIE prefix cache scorer based on estimation from previous requests. - When set to cache_tracking, it creates a prefix cache scorer based on KV-events from vLLM. Signed-off-by: Kfir Toledo <kfir.toledo@ibm.com>
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.
Context
Update
BlockStoredKVEvent to include the lora adapter name.Blocked by: vllm-project/vllm#27577
Tests
Added tests for unmarshalling
BlockStoredKVEvent to ensure backward compatibility.