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: fix early bail out in vectored get #7038

Merged
merged 3 commits into from
Mar 7, 2024

Conversation

VladLazar
Copy link
Contributor

Problem

When vectored get encountered a portion of the key range that could
not be mapped to any layer in the current timeline it would incorrectly
bail out of the current timeline. This is incorrect since we may have
had layers queued for a visit in the fringe.

This was observed in staging on Peter's benchmark tenants.

Summary of changes

  • Add a repro unit test
  • Remove the early bail out path
  • Simplify range search return value

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

When vectored get encountered a portion of the key range that could
not be mapped to any layer in the current timeline it would incorrectly
bail out of the current timeline. This is incorrect since we may have
had layers queued for a visit in the fringe.

The fix is to remove the early bail out altogether. I also refactored
the range search method to simplify the api a bit. This commit makes
the test in the previous patch pass.
@VladLazar VladLazar requested a review from a team as a code owner March 6, 2024 18:10
@VladLazar VladLazar requested review from arpad-m, problame and koivunej and removed request for koivunej March 6, 2024 18:10
Copy link

github-actions bot commented Mar 6, 2024

2490 tests run: 2370 passed, 0 failed, 120 skipped (full report)


Code coverage* (full report)

  • functions: 28.9% (7002 of 24268 functions)
  • lines: 47.6% (43219 of 90865 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
ac3c778 at 2024-03-07T13:32:26.634Z :recycle:

Copy link
Contributor

@koivunej koivunej left a comment

Choose a reason for hiding this comment

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

Looking good!

pageserver/src/tenant.rs Show resolved Hide resolved
pageserver/src/tenant/layer_map.rs Show resolved Hide resolved
@VladLazar VladLazar merged commit 871977f into main Mar 7, 2024
53 checks passed
@VladLazar VladLazar deleted the vlad/vectored-get-fix-early-bail branch March 7, 2024 16:02
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

2 participants