Add test that no redundant image are generatd if them are wanted by GC

This commit is contained in:
Konstantin Knizhnik
2023-03-17 15:25:26 +02:00
parent 3bc4a7c1e2
commit 8b05a87f75

View File

@@ -623,6 +623,9 @@ impl ImageLayerWriterInner {
lsn: self.lsn,
},
);
if final_path.exists() {
warn!("Overwrite existed image layer {}", final_path.display());
}
std::fs::rename(self.path, final_path)?;
trace!("created image layer {}", layer.path().display());