Skip to content
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

allocator: voter constraint not satisfied when constraints are underspecified #122292

Open
kvoli opened this issue Apr 12, 2024 · 0 comments
Open
Labels
A-kv-distribution Relating to rebalancing and leasing. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-support Would prevent or help troubleshoot a customer escalation - bugs, missing observability/tooling, docs P-3 Issues/test failures with no fix SLA T-kv KV Team
Projects

Comments

@kvoli
Copy link
Collaborator

kvoli commented Apr 12, 2024

Describe the problem

A voter constraint may not be satisfied when in an configuration where every existing voter is required to satisfy an all replica constraint and there isn't already a non-voter which would satisfy the voter constraint if promoted.

Note that this case is slightly different than #106559, where there already exists the correct number of replicas to satisfy every constraint, just the type is incorrect. Here, there are not enough replicas to satisfy the voter constraint regardless so a swap cannot take place. e.g.

Config:

num_replicas=4 num_voters=3 
constraints={'+region=a':1,'+region=b':1,'+region=c':1} 
voter_constraints={'+region=c':2}

Topology

a
  └── [1]
b
  └── [2]
c
  └── [3 4]
d
  └── [5]

Existing placement:

a,b,c,d(non-voter)

To Reproduce

See kvoli@f92433a

Expected behavior

Voter constraint is satisfied if possible.

Environment:

  • CockroachDB version All versions affected.

Additional context
Less voting replicas than desired in a locality.

Jira issue: CRDB-37790

@kvoli kvoli added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-support Would prevent or help troubleshoot a customer escalation - bugs, missing observability/tooling, docs A-kv-distribution Relating to rebalancing and leasing. T-kv KV Team P-3 Issues/test failures with no fix SLA labels Apr 12, 2024
@blathers-crl blathers-crl bot added this to Incoming in KV Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-kv-distribution Relating to rebalancing and leasing. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-support Would prevent or help troubleshoot a customer escalation - bugs, missing observability/tooling, docs P-3 Issues/test failures with no fix SLA T-kv KV Team
Projects
KV
Incoming
Development

No branches or pull requests

1 participant