forked from lei.chen/myxce
feat(config-upgrade-snapshot): define HostAdminState/QueueAdminState capnp structs, bump snapshot format version
Adds independently-extensible Cap'n Proto frames for the upgrade snapshot's host/queue admin-state sections (frame-only, not reusing Worker/QueueConf which bundle dynamic state) and bumps SNAPSHOT_FORMAT_VERSION 1->2 so a checkpoint written under the prior raw queue-frame layout is fail-loud rejected rather than misinterpreted. Task 1 of 19. Requirements: 1.9, 5.7
This commit is contained in:
parent
e0c5e8b7a4
commit
9e68335aee
6 changed files with 322 additions and 8 deletions
|
|
@ -443,6 +443,25 @@ typedef struct {
|
|||
uint32_t prevCrc;
|
||||
} capnp_repl_envelope_t;
|
||||
|
||||
/* ── Upgrade snapshot admin-state frames (config-upgrade-snapshot task 1,
|
||||
* Req 1.9/5.7) ───────────────────────────────────────────────────────────
|
||||
* Frame-only wire types for the checkpoint's host/queue admin-state
|
||||
* sections -- carry only the administratively-set (name, status) pair,
|
||||
* never the full xce_worker_t/xce_queue_t (design.md Design Invariant 5: a
|
||||
* snapshot frame must never inherit a live struct's dynamic fields just
|
||||
* because reusing it is convenient). Neither has a corresponding "live" C
|
||||
* struct, so each gets its own frame-only counterpart here, same as
|
||||
* capnp_snap_hdr_t/capnp_persist_cfg_t/capnp_repl_envelope_t above. */
|
||||
typedef struct {
|
||||
char* name;
|
||||
uint32_t status;
|
||||
} capnp_host_admin_state_t;
|
||||
|
||||
typedef struct {
|
||||
char* name;
|
||||
uint32_t status;
|
||||
} capnp_queue_admin_state_t;
|
||||
|
||||
/* ── Config replication Cap'n Proto mapped types (Phase 1) ──────────────
|
||||
* C-side counterparts for the capnp encode/decode shims for config sync.
|
||||
* Struct tags match the forward declarations near the top of this file. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue