mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[GH-ISSUE #2799] [Bug]: [SSD] DSV4 enable SSD offload, Batch get key failed, with the error reported as INVALID_KEY. #727
Labels
No labels
ascend
auto-closed
bug
bug
CI/Build
Common
documentation
enhancement
feature request
good first issue
help wanted
high priority
MetaX
nightly-failure
pull-request
PyTorch Backend
question
RFC
Roadmap
stale
Store
Tests
Transfer Engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/Mooncake#727
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @huangdong2022 on GitHub (Jul 8, 2026).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/2799
Bug Report
Environment
mooncake version(main) :
8b884bcd13The DSV4 model, with SSD enabled, features 4 machines with PD separation, 1P1D, where both P and D are dual-machine setups.
vllm script (P shell)
mooncake master
Error log
Possible reasons
BatchOffloadNotifies Master Before Committing Local Index →INVALID_KEYon GetSymptoms
Under high concurrency between offload and get, many requests fail with
Failed to get key(res: -400, i.e.INVALID_KEY).BatchLoad/ SSD read failures appear alongside request-level load failures. Master-side SSD usage is well below capacity andEvictDiskReplica=0, so the issue is not caused by disk exhaustion.Root Cause
In
BucketStorageBackend::BatchOffload, after a successful disk write the code used to callcomplete_handlerfirst (which triggersNotifyOffloadSuccess, registering aLOCAL_DISKreplica on the Master and allowing MEMORY eviction), and only then commit the client-sideobject_bucket_map_.During that window, concurrent get requests that take the SSD read path cannot find the storage key in the local index →
Key not found→INVALID_KEY. This is a publish-before-commit consistency bug: Master visibility precedes the client local index. It is unrelated to SSD capacity.Incorrect Order (Before Fix)
Fix (
storage_backend.cpp)If
NotifyOffloadSuccessfails:RollbackCommittedBucketrolls back the local index andCleanupOrphanedBucketremoves orphan on-disk files, avoiding either "Client can read but Master does not know" or the reverse ghost-replica case.Before submitting...
@github-actions[bot] commented on GitHub (Jul 8, 2026):
Thanks for opening this issue, @huangdong2022!
161736910A maintainer will triage this when possible. To help us respond faster, please include:
Useful links: Documentation · Contributing guide