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

pageserver: refactor generation-aware loading code into generic #9545

Merged
merged 4 commits into from
Oct 29, 2024

Conversation

jcsp
Copy link
Collaborator

@jcsp jcsp commented Oct 28, 2024

Problem

Indices used to be the only kind of object where we had to search across generations to find the most recent one. As of #9543, manifests will need the same treatment.

Summary of changes

  • Refactor download_index_part to a generic download_generation_object function, which will be usable for downloading manifest objects as well.

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.
  • Do we need to implement analytics? if so did you add the relevant metrics to the dashboard?
  • If this PR requires public announcement, mark it with /release-notes label and add several sentences in this section.

Checklist before merging

  • Do not forget to reformat commit message to not include the above checklist

@jcsp jcsp added c/storage/pageserver Component: storage: pageserver a/tech_debt Area: related to tech debt labels Oct 28, 2024
@jcsp jcsp requested a review from arpad-m October 28, 2024 16:46
@jcsp jcsp requested a review from a team as a code owner October 28, 2024 16:46
Copy link
Member

@arpad-m arpad-m left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

github-actions bot commented Oct 28, 2024

5274 tests run: 5052 passed, 0 failed, 222 skipped (full report)


Flaky tests (2)

Postgres 16

Postgres 15

Code coverage* (full report)

  • functions: 31.3% (7690 of 24566 functions)
  • lines: 48.7% (60429 of 124000 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
05de60b at 2024-10-29T10:14:37.010Z :recycle:

@arpad-m
Copy link
Member

arpad-m commented Oct 28, 2024

Note that one can go further than this: the two manifests both implement deserialization using serde, and the download functions are identical except for the path generation. One could make the path generation function be the parameter, and have the same download code. This would counteract the refactor I did in #9444 to create a generic download function, but it can be undone as well.

@jcsp jcsp enabled auto-merge (squash) October 28, 2024 21:29
@jcsp jcsp merged commit 4ef7421 into main Oct 29, 2024
83 checks passed
@jcsp jcsp deleted the jcsp/issue-9543-pt1 branch October 29, 2024 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a/tech_debt Area: related to tech debt c/storage/pageserver Component: storage: pageserver
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants