-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sql: system.localities uses a single level of locality #20653
Comments
The way I see it, it's better to allow this and make sure we support it fully than to validate against it and error out. From a usability perspective we should only add limits like this if they're needed. |
Does the allocator make the same assumption that these names are globally unique, or does it look at the entire hierarchy? |
The allocator makes no assumptions about uniqueness. |
maybe we can put this in the docs cc @Amruta-Ranade An example of what you can't do
What you would do instead:
|
I would edit the "what you would do instead" to suggest renaming the |
True, could also do
|
@Amruta-Ranade if you've sufficiently documented this limitation, maybe we should close this out or move it to 2.1, since we don't have a plan to address this before 2.0. |
Moving it to 2.1 (documented as discussed for 2.0) |
Added to 2.0 known limitations in cockroachdb/docs#2823. |
@sploiselle yep, no change. |
We have marked this issue as stale because it has been inactive for |
The initial version of the
system.locality
table (#19652) stores lat/long information according to a single key/value pair of localities, on the assumption that these are globally unique. If two values on the same key have the same value, but are nested under different parent localities, they will be treated as distinct for most purposes, but they can't both be assigned lat/long data. For instance, if one node in a cluster is started with--locality=region=west,datacenter=1
and another with--locality=region=east,datacenter=1
, the system table doesn't support assigning lat/long at the datacenter level.There seem to be two potential solutions to this issue: validate the locality flags assigned to nodes in the cluster and fail if there's a collision, or expand the system table to track all ancestor key/value pairs, not just a single level.
In the meantime, we should probably document the limitation.
The text was updated successfully, but these errors were encountered: