-
Notifications
You must be signed in to change notification settings - Fork 463
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: track pageserver availability zone #8852
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3780 tests run: 3674 passed, 0 failed, 106 skipped (full report)Flaky tests (2)Postgres 16
Postgres 15
Code coverage* (full report)
* collected from Rust tests only The comment gets automatically updated with the latest test results
f4cc045 at 2024-08-28T13:16:09.916Z :recycle: |
VladLazar
force-pushed
the
vlad/storcon-track-ps-az
branch
from
August 28, 2024 11:08
1c911e4
to
e7eccb3
Compare
When a node reattaches, it will include a registration request. The registration request may include the AZ id of the node. If the node is already known, but it's AZ id isn't, then extract it from the request and persist in the db and memory.
VladLazar
force-pushed
the
vlad/storcon-track-ps-az
branch
from
August 28, 2024 12:05
e7eccb3
to
4825c70
Compare
VladLazar
force-pushed
the
vlad/storcon-track-ps-az
branch
from
August 28, 2024 12:15
4825c70
to
f4cc045
Compare
5 tasks
jcsp
reviewed
Aug 28, 2024
jcsp
reviewed
Aug 28, 2024
jcsp
approved these changes
Aug 28, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
5 tasks
VladLazar
added a commit
that referenced
this pull request
Sep 3, 2024
## Problem Neon local set-up does not inject an az id in `metadata.json`. See real change in #8852. ## Summary of changes We piggyback on the existing `availability_zone` pageserver configuration in order to avoid making neon local even more complex.
VladLazar
added a commit
that referenced
this pull request
Sep 5, 2024
## Problem #8852 introduced a new nullable column for the `nodes` table: `availability_zone_id` ## Summary of changes * Make neon local and the test suite always provide an az id * Make the az id field in the ps registration request mandatory * Migrate the column to non-nullable and adjust in memory state accordingly * Remove the code that was used to populate the az id for pre-existing nodes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
In order to build AZ aware scheduling, the storage controller needs to know what AZ pageservers are in.
Related #8848
Summary of changes
This patch set adds a new nullable column to the
nodes
table:availability_zone_id
. The node registrationrequest is extended to include the AZ id (pageservers already have this in their
metadata.json
file).If the node is already registered, then we update the persistent and in-memory state with the provided AZ.
Otherwise, we add the node with the AZ to begin with.
A couple assumptions are made here:
Once all pageservers have a configured AZ, we can remove the optionals in the code
and make the database column not nullable.
Testing
I've tested this locally for compat:
Checklist before requesting a review
Checklist before merging