Repository navigation
[rust] Use file lock to protect concurrent accesses to cache - #14898
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
CI Failure Feedback 🧐(Checks updated until commit 1257d6d)
✨ CI feedback usage guide:The CI feedback tool (
In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR: where Configuration options
See more information about the |
User description
Description
The concurrent access to the cache folder by different SM processes might cause the following errors:
error=26, Text file busyThe process cannot access the file because it is being used by another process. (os error 32)This PR implements a file locking mechanism to prevent this kind of problems.
Motivation and Context
Fix for #13511 and #13686.
Types of changes
Checklist
PR Type
Bug fix
Description
Lockstruct with acquire/release functionality using fs2 librarymove_folder_contentfunctionChanges walkthrough 📝
files.rs
Implement file locking for concurrent cache access protectionrust/src/files.rs
Lockstruct to prevent concurrentaccess to cache folder
uncompressfunctionmove_folder_contentfunction
uncompress_debimplementation using new move functionCargo.toml
Add file system dependencies for locking mechanismrust/Cargo.toml