mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[GH-ISSUE #2963] [Bug]: OffsetAllocator eviction loses local replicas when notification fails #768
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#768
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 @feichai0017 on GitHub (Jul 16, 2026).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/2963
Bug report
OffsetAllocatorStorageBackend::EvictToMakeRoom()removes FIFO victims from the shard map and counters beforeBatchOffload()calls the eviction handler. If that handler returns an error,BatchOffload()returns immediately without restoring the victims.This leaves the master free to retain a
LOCAL_DISKreplica for an object that the storage backend no longer contains. The released extent can also be reused by a later write.Reproduction
INTERNAL_ERROR.IsExist()andBatchLoad()for the selected FIFO victim now fail.A focused regression test reproduces this deterministically: after the failed notification,
key_ais missing instead of remaining readable.Expected behavior
Keep selected victims and their allocation handles pending until the master accepts the replica-removal notification. On notification failure, restore the shard map, FIFO index, byte count, and key count; on success, release the pending allocations before retrying allocation.
Existing work
I searched open issues and PRs for OffsetAllocator eviction notification/rollback and found no existing fix. #2932 touches the same backend for persistence, but its current eviction path preserves the same return-without-rollback behavior, so it does not address this bug.
@github-actions[bot] commented on GitHub (Jul 16, 2026):
Thanks for opening this issue, @feichai0017!
132118805A maintainer will triage this when possible. To help us respond faster, please include:
Useful links: Documentation · Contributing guide