forked from lei.chen/myxce
feat(raft-library): task 6.2 — real raft callbacks in ha.c; fix double-free + dead stubs
This commit is contained in:
parent
b77525deb0
commit
8f0d2d55c3
3 changed files with 552 additions and 82 deletions
|
|
@ -176,6 +176,9 @@ typedef struct {
|
|||
int n_peers; /* total candidate count (excluding self) */
|
||||
/* ── New fields added by raft-library spec (Task 6.1) ──────── */
|
||||
raft_state_t raft; /* Raft consensus state (wired in task 6.2) */
|
||||
/* ── New fields added by raft-library spec (Task 6.2) ──────── */
|
||||
cluster_t *raft_c; /* cluster_t* set by ha_start_election_async; used by raft callbacks */
|
||||
void *raft_election_timeout_ctx; /* election_timeout_ctx_t* for cancel (task 6.2) */
|
||||
} ha_state_t;
|
||||
|
||||
/* ── Public API ────────────────────────────────────────────── */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue