Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pageserver): handle version number in draw timeline #8102

Merged
merged 2 commits into from
Jun 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 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,18 @@ 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();

// The current format of the layer file name: 000000067F0000000400000B150100000000-000000067F0000000400000D350100000000__00000000014B7AC8-v1-00000001

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

// Handle version number `-v1` part
if lsns.last().expect("should").starts_with('v') {
lsns.pop();
}

jcsp marked this conversation as resolved.
Show resolved Hide resolved
if lsns.len() == 1 {
lsns.push(lsns[0]);
}
Expand Down
Loading