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: fixes to /location_config API #5548

Merged
merged 8 commits into from
Oct 17, 2023
Merged

Conversation

jcsp
Copy link
Contributor

@jcsp jcsp commented Oct 13, 2023

Problem

I found some issues with the /location_config API when writing new tests.

Summary of changes

  • Calling the API with the "Detached" state is now idempotent.
  • Tenant::spawn_attach now takes a boolean to indicate whether to expect a marker file. Marker files are used in the old attach path, but not in the new location conf API. They aren't needed because in the New World, the choice of whether to attach via remote state ("attach") or to trust local state ("load") will be revised to cope with the transitions between secondary & attached (see pageserver: always attach Tenant from remote storage, remove local-storage load path #5550). It is okay to merge this change ahead of that ticket, because the API is not used in the wild yet.
  • Instead of using schedule_local_tenant_processing, the location conf API handler does its own directory creation and calls spawn_attach directly.
  • A new unsafe_create_dir_all is added. This differs from crashsafe::create_dir_all in two ways:
    • It is intentionally not crashsafe, because in the location conf API we are no longer using directory or config existence as the signal for any important business logic.
    • It is async and uses tokio::fs.

@jcsp jcsp added t/bug Issue Type: Bug c/storage/pageserver Component: storage: pageserver labels Oct 13, 2023
@jcsp jcsp requested a review from a team as a code owner October 13, 2023 10:19
@jcsp jcsp requested review from problame and removed request for a team October 13, 2023 10:19
@github-actions
Copy link

github-actions bot commented Oct 13, 2023

2280 tests run: 2164 passed, 0 failed, 116 skipped (full report)


Flaky tests (2)

Postgres 16

  • test_pageserver_restart[False]: release

Postgres 14

  • test_crafted_wal_end[simple]: debug

Code coverage (full report)

  • functions: 52.5% (8184 of 15597 functions)
  • lines: 81.1% (47825 of 58998 lines)

The comment gets automatically updated with the latest test results
64fd597 at 2023-10-13T15:12:57.089Z :recycle:

pageserver/src/tenant/mgr.rs Outdated Show resolved Hide resolved
pageserver/src/tenant/mgr.rs Outdated Show resolved Hide resolved
pageserver/src/tenant/mgr.rs Outdated Show resolved Hide resolved
pageserver/src/tenant/mgr.rs Show resolved Hide resolved
pageserver/src/tenant/mgr.rs Show resolved Hide resolved
pageserver/src/tenant/delete.rs Outdated Show resolved Hide resolved
pageserver/src/tenant/mgr.rs Outdated Show resolved Hide resolved
@jcsp jcsp requested a review from problame October 13, 2023 14:14
It's logged direclty below, and too big for a trace param
@jcsp jcsp enabled auto-merge (squash) October 13, 2023 17:06
@jcsp jcsp merged commit b06dffe into main Oct 17, 2023
39 checks passed
@jcsp jcsp deleted the jcsp/location-conf-fixes branch October 17, 2023 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/storage/pageserver Component: storage: pageserver t/bug Issue Type: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants