feat(ha-repl-hardening): wire OPCode_walCatchupEntry standby handler (task 2.1)

Replace stub with ha_apply_wal_catchup_entry() calling apply_wal_entry().
CAS-advance applied_lsn on success; log ERROR and skip on failure.
Standby stays in CTRL_STANDBY throughout. 3 new unit tests.
This commit is contained in:
Rongsong Shen 2026-06-04 15:05:52 +00:00
parent e3ca775f0d
commit 647b88ce57
5 changed files with 251 additions and 1 deletions

View file

@ -42,7 +42,7 @@
---
- [ ] 2. Standby-side: Wire WAL catch-up and heartbeat state reporting
- [ ] 2.1 (P) Wire `OPCode_walCatchupEntry` single-entry handler on standby
- [x] 2.1 (P) Wire `OPCode_walCatchupEntry` single-entry handler on standby
- Replace the stub in the dispatch switch (returns 0) with a call to `apply_wal_entry()` for single entries
- On success, advance `applied_lsn` atomically; on error, log ERROR and skip — do not crash
- Standby remains in `CTRL_STANDBY` throughout; does not accept job dispatch during catch-up