mirror of
https://github.com/neondatabase/neon.git
synced 2026-06-02 04:50:38 +00:00
Fix wal-redo unwrap() failure for timeline chains that have 0 records in some timeline
This commit is contained in:
@@ -5206,10 +5206,18 @@ impl Timeline {
|
||||
.cloned()
|
||||
.collect::<Vec<_>>();
|
||||
records = &records[scratch.len()..];
|
||||
|
||||
if later.is_none() {
|
||||
assert!(records.is_empty());
|
||||
}
|
||||
|
||||
// if we don't have any records for this timeline (which is possible)
|
||||
// go to the previous one
|
||||
if scratch.is_empty() {
|
||||
tracing::info!("no records for timeline {}", older.timeline_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
// this is only used for logging on the next round
|
||||
let last_lsn = scratch.last().unwrap().0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user