diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-27 13:30:14 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-27 13:30:14 +0200 |
| commit | 0bebec08cd89039c32bd9b9e73d80d573b6bf0b3 (patch) | |
| tree | 429222b73e259a3f1e3f2d9d229164a4841b41f3 /src/main/java/simulator | |
| parent | 35def2831acd67ace6943e06f502a356529c3357 (diff) | |
sr: fix Raft replay leader election
Diffstat (limited to 'src/main/java/simulator')
| -rw-r--r-- | src/main/java/simulator/builder/SimulationFactory.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/simulator/builder/SimulationFactory.java b/src/main/java/simulator/builder/SimulationFactory.java index 48ec638..165e42d 100644 --- a/src/main/java/simulator/builder/SimulationFactory.java +++ b/src/main/java/simulator/builder/SimulationFactory.java @@ -96,10 +96,12 @@ public class SimulationFactory { .activateClientsAt(100, 1) .activateClientsAt(1700, 2) // Bias process 1 toward a fast, clean post-crash election while - // keeping process 2's timeout comfortably behind it. - .setProtocolLong(1, "electionTimeout", 4000) + // keeping process 2's timeout comfortably behind it. The shorter + // timeout also keeps the headless replay active long enough to + // reach the first post-crash election deterministically. + .setProtocolLong(1, "electionTimeout", 2500) .setProtocolLong(1, "electionJitter", 0) - .setProtocolLong(2, "electionTimeout", 9000) + .setProtocolLong(2, "electionTimeout", 12000) .setProtocolLong(2, "electionJitter", 0) .addCrashEvent(0, 3500); } |
