cockroachdb / cockroachdb/cockroach
asim: test lowering replication factor while voter count remains constant
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
original (three voters in us-east1, non-voters in each of us-east-2 and us-west-2):
```
CONFIGURE ZONE USING
num_replicas = 5,
num_voters = 3,
constraints = '{+region=us-east-1: 1, +region=us-east-2: 1, +region=us-west-2: 1}',
voter_constraints = '[+region=us-east-1]',
lease_preferences = '[[+region=us-east-1]]'
```
new (one voter in each, no non voters):
```
ALTER DATABASE uber CONFIGURE ZONE USING
num_replicas = 3,
num_voters = 3,
constraints = '{+region=us-east-1: 1, +region=us-east-2: 1, +region=us-west-2: 1}',
voter_constraints = '{+region=us-east-1: 1, +region=us-east-2: 1, +region=us-west-2: 1}',
lease_preferences = '[[+region=us-east-1]]'
```
Using the SMA, we observed that the non-voters got removed first, then voters rebalanced over.
It's an interesting case because we could have also "laterally promoted" non-voters (i.e. done a combined voter upgrade + voter removal) instead which would have saved on network cost.
Epic: https://cockroachlabs.atlassian.net/browse/CRDB-58513
Jira issue: CRDB-61828
Contributor guide
Research direction
The issue describes an ASIM scenario that lowers num_replicas from 5 to 3 while keeping three voters and references SMA observations, but it names no file or test. Start by locating ASIM coverage for zone configuration changes and the SMA behavior, then reproduce both configurations. Done means the test captures the expected removal and rebalancing behavior, including whether lateral promotion should be considered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases, distributed-systems, testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100