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

test_runner: fix tenant_get_shards with one pageserver #9603

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

erikgrinaker
Copy link
Contributor

@erikgrinaker erikgrinaker commented Nov 1, 2024

Problem

tenant_get_shards() does not work with a sharded tenant on 1 pageserver, as it assumes an unsharded tenant in this case. This special case appears to have been added to handle e.g. test_emergency_mode, where the storage controller is stopped. This breaks e.g. the sharded ingest benchmark in #9591 when run with a single shard.

Summary of changes

Correctly look up shards even with a single pageserver, but add a special case that assumes an unsharded tenant if the storage controller is stopped and the caller provides an explicit pageserver, in order to accomodate test_emergency_mode.

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

@erikgrinaker erikgrinaker requested a review from jcsp November 1, 2024 10:23
@erikgrinaker erikgrinaker enabled auto-merge (squash) November 1, 2024 10:24
Copy link
Contributor

@jcsp jcsp left a comment

Choose a reason for hiding this comment

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

LGTM - the fast path for one pageserver dates from the early days of multiple pageservers + migrations -- these days its just a footgun.

Copy link

github-actions bot commented Nov 1, 2024

5328 tests run: 5106 passed, 0 failed, 222 skipped (full report)


Flaky tests (1)

Postgres 17

Code coverage* (full report)

  • functions: 31.5% (7768 of 24690 functions)
  • lines: 48.9% (61021 of 124672 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
3072b6d at 2024-11-01T11:18:20.831Z :recycle:

@erikgrinaker erikgrinaker merged commit 4c2c8d6 into main Nov 1, 2024
82 checks passed
@erikgrinaker erikgrinaker deleted the erik/get-tenant-shards branch November 1, 2024 11:25
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.

2 participants