fix(overlaybd): preserve premerged-index cache during full-file cache recovery - #170
Open
huajq wants to merge 1 commit into
Open
fix(overlaybd): preserve premerged-index cache during full-file cache recovery#170huajq wants to merge 1 commit into
huajq wants to merge 1 commit into
Conversation
… recovery BackendState::load_from_disk scans every subdirectory of cacheDir and treats each as a full-file cache entry. The LSMT premerged-index artifact cache lives in the same cache root, so every ImageService creation logged "load cache from disk failed err=cache meta not exists" and deleted the whole premerged-index directory, wiping the artifacts and racing in-flight artifact writes (rename ENOENT). Skip the reserved premerged-index directory during recovery so the artifact cache survives process restarts and lazy ImageService creations.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Skip the reserved
premerged-indexsubdirectory when full-file cache recoveryscans
cacheDir, plus a regression test.Why
The LSMT premerged-index artifact cache lives inside the scanned
cacheDir.Every
ImageServicecreation (node restart, uvm-ublk-daemon lazy creation /respawn) logged
load cache from disk failed err=cache meta not existsanddeleted the whole directory, wiping the cache and racing in-flight writes
(
rename ... No such file or directory).Related issue
N/A — small fix from production logs.
Scope and non-goals
Included: recovery skip + test. Excluded: any on-disk layout change;
writer-side retry (no longer needed).
Design and behavior changes
Recovery skips
PREMERGED_INDEX_DIR(re-exported crate-wide as the singlesource of truth). Real cache entries are still discarded on load failure.
Compatibility and operations
No API, config, layout, or host requirement changes. Existing
.pmidxartifacts now persist across restarts. Safe to roll back.
Validation
Skipped:
makewrappers and unrelated suites; onlyoverlaybdis touched.Risks and reviewer notes
Main file:
storage/overlaybd/src/backend/cache/full_file_cache/cache_pool.rs.Only effect is that the directory named
premerged-indexsurvives recovery.Checklist