Skip to content

storage: replicate queue only takes into account ZoneConfig.ReplicaAttrs[0] #8182

@d4l3k

Description

@d4l3k

From the Replica Zone Format docs

replicas: 
- attrs: [comma-separated attribute list]
- attrs: [comma-separated attribute list]
- attrs: [comma-separated attribute list]

It’s normal and sufficient to define the number of replicas by listing attrs without any specific attributes (i.e., - attrs: []). But if you do set specific attributes for a replica (i.e., - attrs: [us-east-1a, ssd]), the replica will be placed on the nodes/stores with the matching attributes.

However, @petermattis recently discovered that we only take into account the first attrs field when deciding how to add/remove replicas. This should probably be updated in the documentation or (fixed as part of the new ZoneConfig format #7660).

https://github.com/cockroachdb/cockroach/blob/master/storage/replicate_queue.go#L144

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-questionA question rather than an issue. No code/spec/doc change needed.O-communityOriginated from the communitydocs-todo

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions