Conversation
Independent local content stores only coordinate writers within each store instance. Concurrent cache exports to the same directory can open the same ingest files, causing rename failures or incomplete writes. Acquire a filesystem lock per ingest reference before opening a writer or aborting an ingest. Release it when the writer closes or commits, including error paths, and report contention as unavailable so existing retry logic can wait. Preserve references so interrupted uploads remain resumable, and retain lock files to avoid races with replacement inodes. Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
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.
follow-up #7153 (comment)
Fix the ingest-file rename failures reported in #7153 (comment). Concurrent exports to the same local cache directory can open the same temporary ingest files because containerd local content store only coordinates writers within each store instance. This race occurs independently of
reset=trueand was observed both on master and with #7153 applied.Coordinate writers and aborts with a filesystem lock per ingest reference, allowing contending exports to retry while preserving resumability for interrupted uploads. This complements #7153 protection against reset deleting blobs used by active exports.