Fix use of try_lock and lock methods to explicitly use AdvisoryFileLock trait implementation for std::fs::File in core_dump_handler#176
Open
aquaratixc wants to merge 5 commits intoIBM:mainfrom
Open
Conversation
Collaborator
|
Hi @aquaratixc |
Author
Thanks for your reply. I'll resolve the DCO control issue a little later, if you don't mind. |
fix std and advisory_lock collision in try_lock method in core-dump-agent Signed-off-by: aquaratixc <disconnectix@gmail.com>
fix std and advisory_lock collision in lock method in core-dump-composer Signed-off-by: aquaratixc <disconnectix@gmail.com>
fix missing file argument Signed-off-by: aquaratixc <disconnectix@gmail.com>
fix lock method Signed-off-by: aquaratixc <disconnectix@gmail.com>
Author
DCO passed |
Signed-off-by: ou.baharev <ou.baharev@tensor.ru>
No9
approved these changes
Oct 15, 2025
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.
This PR fixes the usage of the try_lock/lock method in the core_dump_composer and core_dump_agent modules of the core-dump-handler project.
Specifically, it enforces the use of the try_lock/lock implementation from the AdvisoryFileLock trait provided by the advisory-lock crate for the std::fs::File type.
This change is necessary to prevent compilation errors on Rust versions 1.89.0 and above, where the compiler tries to call the try_lock/lock method directly from the standard library's std::fs::File instead of from the advisory-lock crate.
With this fix, the code explicitly scopes the try_lock/lock call to AdvisoryFileLock, ensuring compatibility with newer Rust versions and avoiding ambiguous method call errors.
The fix improves stability and future-proofing of the file locking mechanism in core-dump-handler.