Commit 5f23d31
committed
fix(consensus): prevent precommit timeout during commit blocking ops (TM-B3)
Move set_step(Commit) before blocking engine execution and storage commit
operations in commit_block(). This prevents precommit timeouts from being
processed while state is still at Precommit step, which caused state
regression to round+1 and corrupted consensus.
Bug scenario:
1. WAL writes Commit entry, state still at Precommit
2. Engine execution starts (blocking ~2+ seconds)
3. Precommit timeout arrives, passes guards since step=Precommit
4. Timeout handler advances to next round, corrupting consensus
Fix: Set step to Commit immediately after building commit signatures,
before any blocking operations begin. The timeout handler will then
correctly ignore precommit timeouts since current step is already Commit.1 parent eca1738 commit 5f23d31
1 file changed
+17
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2872 | 2872 | | |
2873 | 2873 | | |
2874 | 2874 | | |
| 2875 | + | |
| 2876 | + | |
| 2877 | + | |
| 2878 | + | |
| 2879 | + | |
| 2880 | + | |
| 2881 | + | |
| 2882 | + | |
| 2883 | + | |
| 2884 | + | |
| 2885 | + | |
| 2886 | + | |
| 2887 | + | |
| 2888 | + | |
| 2889 | + | |
2875 | 2890 | | |
2876 | 2891 | | |
2877 | 2892 | | |
| |||
2968 | 2983 | | |
2969 | 2984 | | |
2970 | 2985 | | |
2971 | | - | |
2972 | | - | |
2973 | | - | |
2974 | | - | |
2975 | | - | |
| 2986 | + | |
| 2987 | + | |
2976 | 2988 | | |
2977 | 2989 | | |
2978 | 2990 | | |
| |||
0 commit comments