docs(raft-sim-conformance): cosmetic cleanups (LOW review nits)
- sim_tla_action_name: drop brittle per-case 'raft.tla:NNN' line-number comments (some had drifted a few lines off; the return string IS the stable raft.tla Next-disjunct name, and the function header already cites raft.tla:454). - test_sim_5_1_partition_heal: the per-follower convergence loop was vacuous — it bounded by commit_index, which stays 0 for followers under the leader-only commit model, so the loop never ran. Bound by log_count instead (followers DO advance the replicated log); Log Matching still guarantees the shared-prefix terms agree. Now non-vacuous; still passes. Test/comment-only; no behavior change. Lib suite Ok:1 Fail:0.
This commit is contained in:
parent
0e8b4a12bf
commit
6563adf8c6
2 changed files with 24 additions and 16 deletions
|
|
@ -1025,17 +1025,20 @@ void raft_sim_dump_trace(const raft_sim_cluster_t *c, FILE *fp,
|
|||
*/
|
||||
static const char *sim_tla_action_name(raft_sim_action_kind_t kind)
|
||||
{
|
||||
/* Each return string is verbatim the raft.tla `Next` disjunct name (raft.tla:454);
|
||||
* no per-case line numbers — they drift as raft.tla evolves and the name IS the
|
||||
* stable spec reference. */
|
||||
switch (kind) {
|
||||
case RAFT_SIM_ACT_RESTART: return "Restart"; /* raft.tla:166 */
|
||||
case RAFT_SIM_ACT_TIMEOUT: return "Timeout"; /* raft.tla:178 */
|
||||
case RAFT_SIM_ACT_REQUEST_VOTE: return "RequestVote"; /* raft.tla:190 */
|
||||
case RAFT_SIM_ACT_BECOME_LEADER: return "BecomeLeader"; /* raft.tla:229 */
|
||||
case RAFT_SIM_ACT_CLIENT_REQUEST: return "ClientRequest"; /* raft.tla:246 */
|
||||
case RAFT_SIM_ACT_APPEND_ENTRIES: return "AppendEntries"; /* raft.tla:218 */
|
||||
case RAFT_SIM_ACT_ADVANCE_COMMIT: return "AdvanceCommitIndex"; /* raft.tla:259 */
|
||||
case RAFT_SIM_ACT_RECEIVE: return "Receive"; /* raft.tla:421 */
|
||||
case RAFT_SIM_ACT_DUPLICATE_MESSAGE: return "DuplicateMessage"; /* raft.tla:443 */
|
||||
case RAFT_SIM_ACT_DROP_MESSAGE: return "DropMessage"; /* raft.tla:448 */
|
||||
case RAFT_SIM_ACT_RESTART: return "Restart";
|
||||
case RAFT_SIM_ACT_TIMEOUT: return "Timeout";
|
||||
case RAFT_SIM_ACT_REQUEST_VOTE: return "RequestVote";
|
||||
case RAFT_SIM_ACT_BECOME_LEADER: return "BecomeLeader";
|
||||
case RAFT_SIM_ACT_CLIENT_REQUEST: return "ClientRequest";
|
||||
case RAFT_SIM_ACT_APPEND_ENTRIES: return "AppendEntries";
|
||||
case RAFT_SIM_ACT_ADVANCE_COMMIT: return "AdvanceCommitIndex";
|
||||
case RAFT_SIM_ACT_RECEIVE: return "Receive";
|
||||
case RAFT_SIM_ACT_DUPLICATE_MESSAGE: return "DuplicateMessage";
|
||||
case RAFT_SIM_ACT_DROP_MESSAGE: return "DropMessage";
|
||||
}
|
||||
return "Unknown";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue