From 148a58865ead91d29e56b8cb6232fe35439a50f9 Mon Sep 17 00:00:00 2001 From: Ryo Onodera Date: Wed, 13 Nov 2019 06:21:56 +0900 Subject: [PATCH] Make creating new snapshot.tar.bz2 truly-atomic (#6902) --- core/src/snapshot_packager_service.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/core/src/snapshot_packager_service.rs b/core/src/snapshot_packager_service.rs index 1462ded332..d52eba1872 100644 --- a/core/src/snapshot_packager_service.rs +++ b/core/src/snapshot_packager_service.rs @@ -115,7 +115,6 @@ impl SnapshotPackagerService { // Once everything is successful, overwrite the previous tarball so that other validators // can fetch this newly packaged snapshot - let _ = fs::remove_file(&snapshot_package.tar_output_file); let metadata = fs::metadata(&archive_path)?; fs::rename(&archive_path, &snapshot_package.tar_output_file)?;