cockroach
cockroach copied to clipboard
asim: allocation simulator
This is a tracking issue for the allocation simulator.
Why do we need a simulator?
There is an agreement that unit tests and roachtests are useful but not enough to verify allocation changes, and that a fast (not using real time) and repeatable simulation can be useful to reproduce rare bugs in the allocator. In addition to verifying correctness, optimizing the allocation and rebalancing algorithm is an area that is costly to verify and necessitates slow feedback loops (see QPS Accounting - Experiments internal); this may be addressed by a deterministic simulator.
Tracking
- [x] set up skeleton https://github.com/cockroachdb/cockroach/pull/78272
- [x] random load generator https://github.com/cockroachdb/cockroach/pull/79773
- [x] static config loader https://github.com/cockroachdb/cockroach/pull/79961
- [x] apply workload to state https://github.com/cockroachdb/cockroach/pull/80127
- [x] load adapter https://github.com/cockroachdb/cockroach/pull/81004
- [x] simulate store scanner https://github.com/cockroachdb/cockroach/pull/81770
- [x] simulate gossip https://github.com/cockroachdb/cockroach/pull/81710
- [x] simulate state changes https://github.com/cockroachdb/cockroach/pull/82089
- [x] simulate replicate queue consider rebalance https://github.com/cockroachdb/cockroach/pull/82089
- [x] generate a score, cost and statistics of a simulation run https://github.com/cockroachdb/cockroach/issues/82628
- [x] simulate load based splitting https://github.com/cockroachdb/cockroach/issues/82630
- [x] simulate size based splitting https://github.com/cockroachdb/cockroach/issues/82660
- [x] simulate store rebalancer https://github.com/cockroachdb/cockroach/issues/82631
- [ ] validate the simulator against the a crdb cluster with equivalent configuration
- [ ] validate range count rebalancing https://github.com/cockroachdb/cockroach/issues/83989
- [ ] validate rebalancing https://github.com/cockroachdb/cockroach/issues/83990
Jira issue: CRDB-16618