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
test: turmoil: deterministic fuzz scheduling via BTreeSet
`HashSet` re-seeds its `RandomState` from the OS RNG on every process
launch, so iteration order varies across runs. The fuzz driver's
scheduling decisions — minority/leader-targeted partition membership,
the next membership change set, and the victim picked when shrinking
voters — all depended on that order, breaking `--reproduce` even
though per-node openraft RNG and turmoil-sim RNG were both already
seeded.
The voter-removal path used `active_voters.iter().next().unwrap()`,
which under `HashSet` happens to pick an "arbitrary" voter but under
`BTreeSet` would always pick the smallest id — a fixed bias, not
randomness. Switched it to draw from `member_rng`, the existing
membership-decisions RNG, so we keep seed-deterministic random-looking
choice.
Verified: three back-to-back runs of
`--reproduce 509 --max-steps 50000` now produce byte-identical output.
Previously the same seed could yield PASS, FAIL with `matching: [1, 2]`,
or FAIL with `matching: [1, 4]`.
This unblocks deterministic investigation of the
`CommittedNotOnQuorum` violation captured in `tests-turmoil/ISSUES.md`,
which previously could not be pinned to a specific seed for follow-up.
0 commit comments