feat(ha-single-leader-role): remove CTRL_PRIMARY_COMMITTING enum + remaining decls — compiler-enforced (task 5.2)

This commit is contained in:
Rongsong Shen 2026-06-13 14:41:42 +00:00
parent 7f974e766b
commit 93dfc02717
10 changed files with 44 additions and 55 deletions

View file

@ -150,7 +150,7 @@ static void test_demote_sets_standby_role(void)
/*
* Verify that ha_init zeroes the new fields added for election-iomgr-refactor:
* phase2_done, repl_ack_count, n_peers, client_ssl_ctx
* phase2_done, n_peers, client_ssl_ctx
* and that the surviving leader role values are distinct in ctrl_role_t.
*
* Requirements: 5.2, 8.1 (election-iomgr-refactor spec); 1.2 (ha-single-leader-role:
@ -171,9 +171,6 @@ static void test_ha_init_zeroes_new_fields(void)
/* phase2_done must be explicitly zero after ha_init */
TEST_ASSERT_EQUAL_INT(0, ha.phase2_done);
/* repl_ack_count is _Atomic int; must be zero after ha_init */
TEST_ASSERT_EQUAL_INT(0, atomic_load_explicit(&ha.repl_ack_count, memory_order_relaxed));
/* n_peers must be zero after ha_init */
TEST_ASSERT_EQUAL_INT(0, ha.n_peers);