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: drop out of secondary download if iteration time has passed #8198

Merged
merged 2 commits into from
Jun 28, 2024

Conversation

jcsp
Copy link
Contributor

@jcsp jcsp commented Jun 28, 2024

Problem

Very long running downloads can be wasteful, because the heatmap they're using is outdated after a few minutes.

Closes: #8182

Summary of changes

  • Impose a deadline on timeline downloads, using the same period as we use for scheduling, and returning an UpdateError::Restart when it is reached. This restart will involve waiting for a scheduling interval, but that's a good thing: it helps let other tenants proceed.
  • Refactor download_timeline so that the part where we update the state for local layers is done even if we fall out of the layer download loop with an error: this is important, especially for big tenants, because only layers in the SecondaryDetail state will be considered for eviction.

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 Jun 28, 2024
@jcsp jcsp force-pushed the jcsp/issue-8182-secondary-deadline branch from f3a0728 to 8de8fe3 Compare June 28, 2024 11:15
@jcsp jcsp marked this pull request as ready for review June 28, 2024 11:15
@jcsp jcsp requested a review from a team as a code owner June 28, 2024 11:15
@jcsp jcsp requested a review from problame June 28, 2024 11:15
Copy link

github-actions bot commented Jun 28, 2024

2965 tests run: 2849 passed, 0 failed, 116 skipped (full report)


Flaky tests (3)

Postgres 16

  • test_pg_regress[None]: debug

Postgres 15

  • test_lr_with_slow_safekeeper: release
  • test_ondemand_wal_download_in_replication_slot_funcs: debug

Code coverage* (full report)

  • functions: 32.7% (6907 of 21118 functions)
  • lines: 50.1% (54141 of 108100 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
424f6f5 at 2024-06-28T17:13:07.104Z :recycle:

@jcsp jcsp enabled auto-merge (squash) June 28, 2024 15:34
@jcsp jcsp merged commit babbe12 into main Jun 28, 2024
65 checks passed
@jcsp jcsp deleted the jcsp/issue-8182-secondary-deadline branch June 28, 2024 17:05
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.

pageserver: drop out of secondary download if iteration time has passed
2 participants