You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
100979: asim: extend datadriven test to support recovery r=kvoli a=kvoli
Previously, only rebalancing was supported in the data driven simulation
test. This commit extends the syntax to support recovery scenarios. As
part of the extension, the state generator is split into range
generation and cluster generation.
Examples are added for each command, along with common testing scenarios
such as decommissioning, IO overload, disk fullness and adding a node
(with a store).
The newly supported commands are listed below:
```
- "load_cluster": config=<name>
Load a defined cluster configuration to be the generated cluster in the
simulation. The available confiurations are: single_region: 15 nodes in
region=US, 5 in each zone US_1/US_2/US_3. single_region_multi_store: 3
nodes, 5 stores per node with the same zone/region configuration as
above. multi_region: 36 nodes, 12 in each region and 4 in each zone,
regions having 3 zones. complex: 28 nodes, 3 regions with a skewed
number of nodes per region.
- "gen_ranges" [ranges=<int>] [placement_skew=<bool>] [repl_factor=<int>]
[keyspace=<int>] [range_bytes=<int>]
Initialize the range generator parameters. On the next call to eval, the
range generator is called to assign an ranges and their replica
placement. The default values are ranges=1 repl_factor=3
placement_skew=false keyspace=10000.
- set_liveness node=<int> [delay=<duration>]
status=(dead|decommissioning|draining|unavailable)
Set the liveness status of the node with ID NodeID. This applies at the
start of the simulation or with some delay after the simulation starts,
if specified.
- add_node: [stores=<int>] [locality=<string>] [delay=<duration>]
Add a node to the cluster after initial generation with some delay,
locality and number of stores on the node. The default values are
stores=0 locality=none delay=0.
- set_span_config [delay=<duration>]
[startKey, endKey): <span_config> Provide a new line separated list
of spans and span configurations e.g.
[0,100): num_replicas=5 num_voters=3 constraints={'+region=US_East'}
[100, 500): num_replicas=3
...
This will update the span config for the span [0,100) to specify 3
voting replicas and 2 non-voting replicas, with a constraint that all
replicas are in the region US_East.
- assertion extended to support two new assertion types:
For type=stat assertions, if the stat (e.g. stat=replicas) value of the
last ticks (e.g. ticks=5) duration is not exactly equal to threshold,
the assertion fails. This applies for a specified store which must be
provided with store=storeID.
For type=conformance assertions, you may assert on the number of
replicas that you expect to be under-replicated(under),
over-replicated(over), unavailable(unavailable) and violating
constraints(violating) at the end of the evaluation.
- "topology" [sample=<int>]
Print the cluster locality topology of the sample given (default=last).
e.g. for the load_cluster config=single_region
US
..US_1
....└── [1 2 3 4 5]
..US_2
....└── [6 7 8 9 10]
..US_3
....└── [11 12 13 14 15]
```
Informs: cockroachdb#90137
Release note: None
Co-authored-by: Austen McClernon <[email protected]>
0 commit comments