-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[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 busy
The 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
Lock
struct with acquire/release functionality using fs2 librarymove_folder_content
functionChanges walkthrough 📝
files.rs
Implement file locking for concurrent cache access protection
rust/src/files.rs
Lock
struct to prevent concurrentaccess to cache folder
uncompress
functionmove_folder_content
function
uncompress_deb
implementation using new move functionCargo.toml
Add file system dependencies for locking mechanism
rust/Cargo.toml