feat(ha-repl-hardening): add batch entries list to WalCatchupEntry schema (task 1.2)
Add self-referential entries @3 :List(WalCatchupEntry) field with
$C.maplistcount("n_entries"). Single-entry path unaffected — n_entries
defaults to 0, entries to NULL when not using batch mode.
This commit is contained in:
parent
9a977b3a43
commit
51907ebfbc
3 changed files with 8 additions and 5 deletions
|
|
@ -17,7 +17,7 @@
|
||||||
- _Requirements: 1.1, 1.3_
|
- _Requirements: 1.1, 1.3_
|
||||||
- _Boundary: Wire Protocol (controller.capnp)_
|
- _Boundary: Wire Protocol (controller.capnp)_
|
||||||
|
|
||||||
- [ ] 1.2 Extend `WalCatchupEntry` for batch support in controller.capnp
|
- [x] 1.2 Extend `WalCatchupEntry` for batch support in controller.capnp
|
||||||
- Add `entries :List(WalCatchupEntry)` field for multiple entries per message
|
- Add `entries :List(WalCatchupEntry)` field for multiple entries per message
|
||||||
- Regenerate capnp bindings; verify compilation
|
- Regenerate capnp bindings; verify compilation
|
||||||
- Compilation succeeds; single-entry decode path still works
|
- Compilation succeeds; single-entry decode path still works
|
||||||
|
|
|
||||||
|
|
@ -286,10 +286,12 @@ typedef struct {
|
||||||
xce_data_t *payload;
|
xce_data_t *payload;
|
||||||
} snapshot_transfer_t;
|
} snapshot_transfer_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct wal_catchup_entry {
|
||||||
uint64_t lsn;
|
uint64_t lsn;
|
||||||
uint8_t entry_type;
|
uint8_t entry_type;
|
||||||
xce_data_t *payload;
|
xce_data_t *payload;
|
||||||
|
int n_entries; /* batch: number of sub-entries */
|
||||||
|
struct wal_catchup_entry **entries; /* batch: array of sub-entry pointers */
|
||||||
} wal_catchup_entry_t;
|
} wal_catchup_entry_t;
|
||||||
|
|
||||||
/* ── Persistence Cap'n Proto mapped types (P0-9) ─────────────────────
|
/* ── Persistence Cap'n Proto mapped types (P0-9) ─────────────────────
|
||||||
|
|
|
||||||
|
|
@ -838,6 +838,7 @@ struct WalCatchupEntry $C.mapname("wal_catchup_entry_t") {
|
||||||
lsn @0 :UInt64 $C.mapname("lsn");
|
lsn @0 :UInt64 $C.mapname("lsn");
|
||||||
entryType @1 :UInt8 $C.mapname("entry_type");
|
entryType @1 :UInt8 $C.mapname("entry_type");
|
||||||
payload @2 :Data $C.mapname("payload");
|
payload @2 :Data $C.mapname("payload");
|
||||||
|
entries @3 :List(WalCatchupEntry) $C.mapname("entries") $C.maplistcount("n_entries");
|
||||||
}
|
}
|
||||||
|
|
||||||
struct CtrlHelloRequest $C.mapname("ctrl_hello_req_t") {
|
struct CtrlHelloRequest $C.mapname("ctrl_hello_req_t") {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue