feat(ha-single-leader-role): remove CTRL_PRIMARY_COMMITTING enum + remaining decls — compiler-enforced (task 5.2)
This commit is contained in:
parent
7f974e766b
commit
93dfc02717
10 changed files with 44 additions and 55 deletions
|
|
@ -372,7 +372,7 @@ static int myreq_handler(vtask_t* task)
|
|||
* raft_on_vote_request handles:
|
||||
* - stale-term deny (term < current_term)
|
||||
* - term upgrade (term > current_term → clear voted_for)
|
||||
* - role gate: RAFT_LEADER denies; COMMITTING gate in on_vote_eligible
|
||||
* - role gate: RAFT_LEADER denies (via on_vote_eligible)
|
||||
* - one-vote-per-term invariant (voted_for != -1 && voted_for != from_idx)
|
||||
* - on_persist before granting (durability guarantee)
|
||||
*
|
||||
|
|
@ -925,7 +925,6 @@ int cluster_init_phase1(cluster_t* c)
|
|||
.max_promotion_retries = HA_DEFAULT_MAX_PROMOTION_RETRIES,
|
||||
.election_jitter_max_ms = HA_DEFAULT_ELECTION_JITTER_MAX_MS,
|
||||
.election_priority_step_ms = HA_DEFAULT_ELECTION_PRIORITY_STEP_MS,
|
||||
.committing_timeout_ms = HA_DEFAULT_COMMITTING_TIMEOUT_MS,
|
||||
};
|
||||
|
||||
int my_priority = 0;
|
||||
|
|
@ -1464,8 +1463,8 @@ int cluster_run(cluster_t* c)
|
|||
* This triggers handle_ctrlhello on the receiving standby, which runs the
|
||||
* existing catch-up replication sequence (WAL streaming, config push).
|
||||
*
|
||||
* Must be called from the COMMITTING path in ha_elect_evaluate_and_signal
|
||||
* after ha->role is set to CTRL_PRIMARY_COMMITTING (Req 7.2).
|
||||
* Must be called from the post-election path in ha_elect_evaluate_and_signal
|
||||
* after ha->role is set to CTRL_PRIMARY (Req 7.2).
|
||||
*
|
||||
* Thread safety: acquires ha->lock around standby_endpoints iteration.
|
||||
* Best-effort: failures per-endpoint are logged but do not abort the loop.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue