-
Notifications
You must be signed in to change notification settings - Fork 40
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
Omicron services need more unique ids #2922
Conversation
#[derive( | ||
Clone, Debug, Deserialize, Serialize, JsonSchema, PartialEq, Eq, Hash, | ||
)] | ||
pub struct ServiceZoneService { |
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.
I can probably do another pass on the naming here to collapse "Service" out of this in a separate PR, but the addition of this structure makes sense to me!
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.
Thanks for taking a look!
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.
Thanks for getting that fixed!
See #2813 for more context. Today, services have one id, the
service_id
, which is unique. We generally use the zone id for this. That means that if we wind up registering two logical services in one zone (as we do for things like Internal DNS), we cannot store both records. In this change I'm trying to balance:What I did was:
zone_id
column in theservice
table. It's nullable because we might have some services not in standard control plane zones (e.g., in the GZ). This column is really only intended for debugging.service_id
matches thezone_id
, again for debugging.I could see this last part being the worst of both worlds. It'd be a problem if we accidentally depended on the fact that service_id == zone_id, which is true in most cases. Thoughts?
Fixes #2813.