Add logging to move_and_async_delete_path (#32017)
This commit is contained in:
parent
36ccc71220
commit
ddbc35fcc3
|
@ -512,9 +512,22 @@ pub fn move_and_async_delete_path(path: impl AsRef<Path>) {
|
||||||
Builder::new()
|
Builder::new()
|
||||||
.name("solDeletePath".to_string())
|
.name("solDeletePath".to_string())
|
||||||
.spawn(move || {
|
.spawn(move || {
|
||||||
std::fs::remove_dir_all(path_delete).unwrap();
|
trace!("background deleting {}...", path_delete.display());
|
||||||
|
let (_, measure_delete) = measure!(std::fs::remove_dir_all(&path_delete)
|
||||||
|
.map_err(|err| {
|
||||||
|
SnapshotError::IoWithSourceAndFile(
|
||||||
|
err,
|
||||||
|
"background remove_dir_all",
|
||||||
|
path_delete.clone(),
|
||||||
|
)
|
||||||
})
|
})
|
||||||
.unwrap();
|
.expect("background delete"));
|
||||||
|
trace!(
|
||||||
|
"background deleting {}... Done, and{measure_delete}",
|
||||||
|
path_delete.display()
|
||||||
|
);
|
||||||
|
})
|
||||||
|
.expect("spawn background delete thread");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The account snapshot directories under <account_path>/snapshot/<slot> contain account files hardlinked
|
/// The account snapshot directories under <account_path>/snapshot/<slot> contain account files hardlinked
|
||||||
|
|
Loading…
Reference in New Issue