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

chore(pageserver): separate missing key error #7393

Merged
merged 8 commits into from
Apr 22, 2024
Merged

Conversation

skyzh
Copy link
Member

@skyzh skyzh commented Apr 16, 2024

Problem

As part of #7375 and to improve the current vectored get implementation, we separate the missing key error out. This also saves us several Box allocations in the get page implementation.

Summary of changes

  • Create a caching field of layer traversal id for each of the layer.
  • Remove box allocations for layer traversal id retrieval and implement MissingKey error message as before. This should be a little bit faster.
  • Do not format error message until Display.
  • For in-mem layer, the descriptor is different before/after frozen. I'm using once lock for that.

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

Signed-off-by: Alex Chi Z <chi@neon.tech>
@skyzh skyzh marked this pull request as ready for review April 16, 2024 08:30
@skyzh skyzh requested a review from a team as a code owner April 16, 2024 08:30
@skyzh skyzh requested review from arpad-m and VladLazar April 16, 2024 08:30
Signed-off-by: Alex Chi Z <chi@neon.tech>
Signed-off-by: Alex Chi Z <chi@neon.tech>
Signed-off-by: Alex Chi Z <chi@neon.tech>
Signed-off-by: Alex Chi Z <chi@neon.tech>
Copy link
Contributor

@VladLazar VladLazar left a comment

Choose a reason for hiding this comment

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

Nice change. Some comments inline.

pageserver/src/tenant/timeline.rs Outdated Show resolved Hide resolved
pageserver/src/tenant/timeline.rs Outdated Show resolved Hide resolved
pageserver/src/pgdatadir_mapping.rs Show resolved Hide resolved
Copy link

github-actions bot commented Apr 16, 2024

2772 tests run: 2654 passed, 0 failed, 118 skipped (full report)


Code coverage* (full report)

  • functions: 28.1% (6464 of 23041 functions)
  • lines: 46.8% (45671 of 97588 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
57e33fd at 2024-04-22T14:45:45.858Z :recycle:

Signed-off-by: Alex Chi Z <chi@neon.tech>
Signed-off-by: Alex Chi Z <chi@neon.tech>
@skyzh skyzh requested a review from VladLazar April 17, 2024 07:20
@skyzh skyzh mentioned this pull request Apr 22, 2024
24 tasks
@skyzh skyzh merged commit 25d9dc6 into main Apr 22, 2024
47 of 50 checks passed
@skyzh skyzh deleted the skyzh/pgserver-missing-key branch April 22, 2024 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants