mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-03 19:42:55 +00:00
Remove temp layer files during timeline initialization on pageserver start
This commit is contained in:
@@ -421,6 +421,14 @@ fn collect_timeline_files(
|
||||
entry_path.display()
|
||||
)
|
||||
})?;
|
||||
} else if entry_path.extension().and_then(OsStr::to_str) == Some("temp") {
|
||||
info!("removing temp layer file at {}", entry_path.display());
|
||||
std::fs::remove_file(&entry_path).with_context(|| {
|
||||
format!(
|
||||
"failed to remove temp layer file at {}",
|
||||
entry_path.display()
|
||||
)
|
||||
})?;
|
||||
} else {
|
||||
timeline_files.insert(entry_path);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user