Skip to content

Commit

Permalink
fix(pageserver): handle version number in draw timeline (#8102)
Browse files Browse the repository at this point in the history
We now have a `vX` number in the file name, i.e.,
`000000067F0000000400000B150100000000-000000067F0000000400000D350100000000__00000000014B7AC8-v1-00000001`

The related pull request for new-style path was merged a month ago
#7660

## Summary of changes

Fixed the draw timeline dir command to handle it.

---------

Signed-off-by: Alex Chi Z <chi@neon.tech>
  • Loading branch information
skyzh committed Jun 24, 2024
1 parent a4db2af commit d8ffe66
Showing 1 changed file with 8 additions and 0 deletions.
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();
}

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

1 comment on commit d8ffe66

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3004 tests run: 2877 passed, 1 failed, 126 skipped (full report)


Failures on Postgres 14

  • test_storage_controller_many_tenants[github-actions-selfhosted]: release
# Run all failed tests locally:
scripts/pytest -vv -n $(nproc) -k "test_storage_controller_many_tenants[release-pg14-github-actions-selfhosted]"

Code coverage* (full report)

  • functions: 32.5% (6873 of 21131 functions)
  • lines: 50.0% (53390 of 106774 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
d8ffe66 at 2024-06-24T16:58:25.121Z :recycle:

Please sign in to comment.