[Core][KV Events] Echo session_id on GPU BlockStored events (#51381)

Signed-off-by: liuguangli <liuguangli35@gmail.com>
Signed-off-by: jinx-machinepulse <2679622408@qq.com>
Co-authored-by: liuguangli <liuguangli35@gmail.com>
Co-authored-by: OpenAI Codex <codex@openai.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
guangli_Liu
2026-09-04 02:22:50 +00:00
committed by GitHub
co-authored by liuguangli OpenAI Codex mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent 19c018ec05
commit d9e2b5238d
6 changed files with 148 additions and 0 deletions
+7
View File
@@ -78,6 +78,12 @@ class BlockStored(KVCacheEvent):
locality: str | None = None
"""Secondary offloading tier identifier, if generated by one."""
ownership: str | None = None
"""Session that triggered this store or reuse report.
This identifies the request context that emitted the event, not exclusive
ownership of the underlying block, which may be shared across sessions.
"""
session_id: str | None = None
def __hash__(self) -> int:
return hash(
@@ -94,6 +100,7 @@ class BlockStored(KVCacheEvent):
self.kv_cache_spec_sliding_window,
self.locality,
self.ownership,
self.session_id,
)
)