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

tests: wait for uploads in test_secondary_downloads #7220

Merged
merged 1 commit into from Mar 26, 2024

Conversation

jcsp
Copy link
Contributor

@jcsp jcsp commented Mar 25, 2024

Problem

This test occasionally failed with some layers unexpectedly not present on the secondary pageserver. The issue in that failure is the attached pageserver uploading heatmaps that refer to not-yet-uploaded layers.

Summary of changes

After uploading heatmap, drain upload queue on attached pageserver, to guarantee that all the layers referenced in the haetmap are uploaded.

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/test Area: related to testing a/tech_debt Area: related to tech debt labels Mar 25, 2024
Copy link

2718 tests run: 2580 passed, 0 failed, 138 skipped (full report)


Code coverage* (full report)

  • functions: 28.1% (6280 of 22338 functions)
  • lines: 46.9% (44179 of 94105 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
10c6e31 at 2024-03-25T09:59:24.316Z :recycle:

@jcsp jcsp marked this pull request as ready for review March 25, 2024 11:57
@jcsp jcsp requested a review from VladLazar March 26, 2024 09:29
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.

The test change itself makes sense, but isn't this a property that we should enforce in the pageserver? From a quick look at the code it looks like it may happen during normal operation (i.e. not forcing the heatmap upload).

@jcsp
Copy link
Contributor Author

jcsp commented Mar 26, 2024

The test change itself makes sense, but isn't this a property that we should enforce in the pageserver? From a quick look at the code it looks like it may happen during normal operation (i.e. not forcing the heatmap upload).

The download path is intentionally sloppy: it permits the heatmap to contain a layer that 404s on read (this is normal in cases like GC/compaction). If we have a layer enqueued for upload, and we must choose between omitting it (secondary gets a less complete set of layers) and including it (secondary will get a 404 and skip it), including it is generally nicer behavior.

@jcsp jcsp merged commit 5dee58f into main Mar 26, 2024
57 checks passed
@jcsp jcsp deleted the jcsp/issue-6966-secondary-downloads branch March 26, 2024 10:59
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 a/test Area: related to testing c/storage/pageserver Component: storage: pageserver
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants