feat(ha-repl-hardening): standby snapshot receive handler (task 3.5c)
ha_handle_snapshot_chunk writes chunks to snap.part, on isLast verifies
total_size, atomic renames to snap-{lsn}.bin, loads via new
persist_load_snapshot wrapper, sets applied_lsn=checkpoint_lsn.
3 tests: 2-chunk assembly, size mismatch, null args. Wired into
myreq_handler OPCode_snapshotTransfer dispatch.
This commit is contained in:
parent
318098c727
commit
cbd91fca43
7 changed files with 361 additions and 2 deletions
|
|
@ -125,7 +125,7 @@
|
|||
- _Boundary: Controller FSM (ha.c)_
|
||||
- _Depends: 3.5a, 3.2_
|
||||
|
||||
- [ ] 3.5c Standby-side snapshot receive handler (OPCode_snapshotTransfer)
|
||||
- [x] 3.5c Standby-side snapshot receive handler (OPCode_snapshotTransfer)
|
||||
- Add case OPCode_snapshotTransfer in myreq_handler dispatch (cluster.c)
|
||||
- Write each chunk payload to snap.part temp file; on isLast=true, verify total size, atomic rename to snap-{lsn}.bin, load via load_snapshot()
|
||||
- Set applied_lsn = checkpoint_lsn (in-memory) after successful load
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue