Skip to content

fix: avoid stale part downloads during cache merge#235

Open
chenrui333 wants to merge 1 commit into
falcondev-oss:devfrom
chenrui333:rchen.fix-cache-restore-parts-race
Open

fix: avoid stale part downloads during cache merge#235
chenrui333 wants to merge 1 commit into
falcondev-oss:devfrom
chenrui333:rchen.fix-cache-restore-parts-race

Conversation

@chenrui333
Copy link
Copy Markdown

@chenrui333 chenrui333 commented May 22, 2026

Summary

Fixes a restore-path race where a cache entry can start streaming parts/* while another restore finishes the background merge and deletes those parts.

Changes:

  • verify each expected part object before streaming a parts-backed cache entry
  • keep parts for a short grace period after merge and let the existing cleanup job delete them later
  • prune stale cache-entry metadata after an object-not-found restore so later restores miss at lookup instead of repeatedly returning a broken download URL
  • add stale-cache regression coverage for retained parts and stale metadata pruning

Signed-off-by: Rui Chen <rui@chenrui.dev>
@chenrui333
Copy link
Copy Markdown
Author

cc @LouisHaftmann

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant