Skip to content

Commit

Permalink
fix(pageserver): handle version number in draw timeline
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Chi Z <chi@neon.tech>
  • Loading branch information
skyzh committed Jun 18, 2024
1 parent 6bb8b1d commit 1c948c0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pageserver/ctl/src/draw_timeline_dir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,16 @@ fn parse_filename(name: &str) -> (Range<Key>, Range<Lsn>) {
let keys: Vec<&str> = split[0].split('-').collect();
let mut lsns: Vec<&str> = split[1].split('-').collect();

// Handle generation number
if lsns.last().expect("should").len() == 8 {
lsns.pop();
}

// Handle version number
if lsns.last().expect("should").starts_with("v") {
lsns.pop();
}

if lsns.len() == 1 {
lsns.push(lsns[0]);
}
Expand Down

0 comments on commit 1c948c0

Please sign in to comment.