Make creating new snapshot.tar.bz2 truly-atomic (#6902)
This commit is contained in:
committed by
Michael Vines
parent
2523fa73cf
commit
148a58865e
@ -115,7 +115,6 @@ impl SnapshotPackagerService {
|
|||||||
|
|
||||||
// Once everything is successful, overwrite the previous tarball so that other validators
|
// Once everything is successful, overwrite the previous tarball so that other validators
|
||||||
// can fetch this newly packaged snapshot
|
// can fetch this newly packaged snapshot
|
||||||
let _ = fs::remove_file(&snapshot_package.tar_output_file);
|
|
||||||
let metadata = fs::metadata(&archive_path)?;
|
let metadata = fs::metadata(&archive_path)?;
|
||||||
fs::rename(&archive_path, &snapshot_package.tar_output_file)?;
|
fs::rename(&archive_path, &snapshot_package.tar_output_file)?;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user