[KV Connector] MooncakeStore: don't co-queue save with load to avoid double delayed-free (#43371)

Signed-off-by: Dao Le <Dao007forever@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dao007forever
2026-05-22 16:14:11 +00:00
committed by GitHub
co-authored by Claude Opus 4.7
parent c7624bea5e
commit b21f3d56d4
2 changed files with 241 additions and 0 deletions
@@ -236,6 +236,12 @@ class ReqMeta:
)
skip_save = skip_save or num_tokens_to_save < chunk_boundary
# A ReqMeta must never carry both a save AND a load.
# The save would also be wasted work — the bytes are being looked up
# in the store right now. Later cached_reqs steps save new tokens
# normally.
if load_spec is not None and load_spec.can_load:
skip_save = True
if skip_save and load_spec is None:
return None