Fallback to synchronous rm_dir call if path moving fails#27306
Fallback to synchronous rm_dir call if path moving fails#27306xiangzhu70 merged 1 commit intosolana-labs:masterfrom
Conversation
Remove some log lines, as suggested in PR solana-labs#26910
| .name("solDeletePath".to_string()) | ||
| .spawn(move || { | ||
| std::fs::remove_dir_all(&path_delete).unwrap(); | ||
| info!( |
There was a problem hiding this comment.
I did find this log mesage useful fwiw
mvines
left a comment
There was a problem hiding this comment.
lgtm, just a nit. generally please dont ask for review on Draft PRs though. process wise a Draft is something that is not ready for review by definition
| err.to_string() | ||
| ); | ||
| std::fs::remove_dir_all(&path).unwrap(); | ||
| return; |
There was a problem hiding this comment.
seems like we can easily avoid this early return by using an } else {
There was a problem hiding this comment.
I usually let the the function do the early return for various exceptions, and let the later main part of the function represent the more likely flow, and avoid too much indention in that part. I can make the change if less early return is really preferred.
There was a problem hiding this comment.
My pref in this case would be to remove the early return but I'm not going to attempt to force compliance.
Remove some log lines, as suggested in PR #26910
Problem
path renaming may fail in the /mnt/account case.
Summary of Changes
Fall back to synchronous rmdir call if the path renaming fails.
Fixes #