You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the tenant is really Detached, we can 409 out immediately
If it's meant to be attached but hasn't got an attached_pageserver yet, we can 503 and let the caller retry
So do we even need this? It's hard to reason about vs. deadlocks because it can block indefinitely.
The check for i.1 not being None is not very readable, we should make it clearer whether we're saying "must have generation pageserver" or "must have generation".
The text was updated successfully, but these errors were encountered:
## Problem
This is a followup to #8783
- The old blocking ensure_attached function had been retained to handle
the case where a shard had a None generation_pageserver, but this wasn't
really necessary.
- There was a subtle `.1` in the code where a struct would have been
clearer
Closes#8819
## Summary of changes
- Add ShardGenerationState to represent the results of peek_generation
- Instead of calling ensure_attached when a tenant has a non-attached
shard, check the shard's policy and return 409 if it isn't Attached,
else return 503 if the shard's policy is attached but it hasn't been
reconciled yet (i.e. has a None generation_pageserver)
via #8783
i.1
not being None is not very readable, we should make it clearer whether we're saying "must have generation pageserver" or "must have generation".The text was updated successfully, but these errors were encountered: