Omicron services need more unique ids #2922
Merged
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.
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.