mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-21 15:10:44 +00:00
fix uninit glitch
cherry-picked from https://github.com/neondatabase/neon/pull/4458
This commit is contained in:
committed by
Christian Schwarz
parent
0c0cd1857d
commit
e839c97188
@@ -1054,6 +1054,13 @@ impl Tenant {
|
||||
);
|
||||
}
|
||||
} else if is_uninit_mark(&timeline_dir) {
|
||||
if !timeline_dir.exists() {
|
||||
warn!(
|
||||
"Timeline dir entry become invalid: {}",
|
||||
timeline_dir.display()
|
||||
);
|
||||
continue;
|
||||
}
|
||||
let timeline_uninit_mark_file = &timeline_dir;
|
||||
info!(
|
||||
"Found an uninit mark file {}, removing the timeline and its uninit mark",
|
||||
@@ -1077,6 +1084,13 @@ impl Tenant {
|
||||
error!("Failed to clean up uninit marked timeline: {e:?}");
|
||||
}
|
||||
} else {
|
||||
if !timeline_dir.exists() {
|
||||
warn!(
|
||||
"Timeline dir entry become invalid: {}",
|
||||
timeline_dir.display()
|
||||
);
|
||||
continue;
|
||||
}
|
||||
let timeline_id = timeline_dir
|
||||
.file_name()
|
||||
.and_then(OsStr::to_str)
|
||||
|
||||
Reference in New Issue
Block a user