feat(ha-single-leader-role): WAL_NOOP entry type — enum + apply no-op + RETAIN classify (task 1.2)

This commit is contained in:
Rongsong Shen 2026-06-13 07:45:21 +00:00
parent 6df1283f1a
commit e6abd7c8af
3 changed files with 13 additions and 1 deletions

View file

@ -11,7 +11,7 @@
- Observable completion: build succeeds with the new test file; all new cases FAIL (red) — `WAL_NOOP` does not exist yet
- _Requirements: 2.1_
- [ ] 1.2 Implement WAL_NOOP to green
- [x] 1.2 Implement WAL_NOOP to green
- Add `WAL_NOOP = 40` to `wal_entry_type` (src/include/wal_types.h:44-58) with comment: internal, empty payload, replay no-op, appended only at promotion; value stays below `WAL_ENTRY_TYPE_MAX` (100, src/include/config.h:80) so standbys LSN-advance and ACK it via the existing common path
- Add explicit `case WAL_NOOP: break;` to `apply_wal_entry`'s type switch (persist.c:728-765 anchor); add the `WAL_NOOP → WAL_MODE_RETAIN` row to `wal_classify` (the row barrier-rollout pre-declared)
- Observable completion: all task 1.1 tests PASS; barrier-rollout's classification totality test still PASSES