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

storcon: verbose logs in rare case of shards not attached yet #10262

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

jcsp
Copy link
Collaborator

@jcsp jcsp commented Jan 2, 2025

Problem

When we do a timeline CRUD operation, we check that the shards we need to mutate are currently attached to a pageserver, by reading generation and generation_pageserver from the database.

If any don't appear to be attached, we respond with a a 503 and "One or more shards in tenant is not yet attached".

This is happening more often than expected, and it's not obvious with current logging what's going on: specifically which shard has a problem, and exactly what we're seeing in these persistent generation columns.

(Aside: it's possible that we broke something with the change in #10011 which clears generation_pageserver when we detach a shard, although if so the mechanism isn't trivial: what should happen is that if we stamp on generation_pageserver if a reconciler is running, then it shouldn't matter because we're about to

Summary of changes

  • When we are in Attached mode but find that generation_pageserver/generation are unset, output details while looping over shards.

Copy link

github-actions bot commented Jan 2, 2025

6450 tests run: 6166 passed, 0 failed, 284 skipped (full report)


Flaky tests (1)

Postgres 14

Code coverage* (full report)

  • functions: 31.2% (8403 of 26940 functions)
  • lines: 47.9% (66682 of 139101 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
362bdff at 2025-01-02T19:23:35.369Z :recycle:

@jcsp jcsp marked this pull request as ready for review January 3, 2025 10:20
@jcsp jcsp requested a review from a team as a code owner January 3, 2025 10:20
@jcsp jcsp requested a review from erikgrinaker January 3, 2025 10:20
@jcsp jcsp added this pull request to the merge queue Jan 3, 2025
Merged via the queue into main with commit c08759f Jan 3, 2025
85 checks passed
@jcsp jcsp deleted the jcsp/shards-not-attached-logs branch January 3, 2025 10:57
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