fix(wire): open [MIN,WIRE] window — rolling upgrades possible - #244
fix(wire): open [MIN,WIRE] window — rolling upgrades possible#244EnRaiha wants to merge 1 commit into
Conversation
…odeDB-Lab#165) Replace the exact-equality join gate (handle_join.rs) with a range window [min_wire_version, CLUSTER_WIRE_FORMAT_VERSION] so mixed-version clusters can form (N-1 rolling upgrade): - nodedb-types: MIN_WIRE_FORMAT_VERSION=1, WIRE_FORMAT_VERSION=2; doc essay rewritten for window semantics (schema vs transport versions explicitly separated; bump WIRE only with a wire-shape change). - handle_join: wire_version_in_window() pure gate + effective floor (max(compile-time MIN, persisted ClusterSettings.min_wire_version)) threaded through JoinFlow call sites; operator knob now enforced. - ClusterVersionView moved from nodedb (inverted dep) to nodedb-cluster/src/topology/version_view.rs; nodedb re-exports a shim; dangling rustdoc links in topology.rs fixed. - restart: self NodeInfo.wire_version re-stamped to current build on restart after upgrade (in-memory + persisted, raise-only, idempotent), extracted as pure restamp_self_wire_version() so the upgrade path is testable without a live QUIC transport. - join: window_from_join_response() helper logs the observed cluster version window; rejection message now carries the accepted window. - cluster_settings doc: knob enforcement documented at the gate. - Tests: wire_version_in_window boundaries, mixed-window accept/reject, zero-version reject, restart re-stamp (stale→current, idempotent), view tests now LIVE (previously skipped when WIRE < 2), versions.rs reject_older flipped to older_in_window_accepted, handshake suite extended with N-1 accept + future reject. Verification: nodedb-types+nodedb 6246 pass, nodedb-cluster lib 1023/1023, clippy -D warnings 0, zero exact-equality gates left, maya-gate L1 clean 12/12. Rustdoc -D broken_intra_doc_links: 32 PRE-EXISTING errors in untouched files (applied_watcher, auth/bundle, calvin/sequencer, forward, mirror, raft_loop builder/hooks) — not a regression; fix tracked separately. Refactor note (deferred, P2-GLM53-REVIEW-RESOLUTION Improvement 2): VersionWindow newtype in nodedb-types + fold RPC_FRAME_VERSION into the transport envelope; the 3 version systems stay separate but documented. JoinResponse rkyv constraint keeps phase-1 wire-change-free (deferred window echo in envelope-versioned structs post-1.0).
Drill/fix-plan/GLM-resolution docs (commit dd0c316) written pre-fix are now stale. Add resolution banners pointing to the implemented fixes: SWIM 8886846 (PR NodeDB-Lab#243), wire window e60a853 (PR NodeDB-Lab#244), epoch fence 4f92959 (PR NodeDB-Lab#245), lease GC 16d9916 (PR NodeDB-Lab#246). Full verification + refactor code in P2-REPORT.md.
|
Closing this one without taking the change, and the reason is different from the other four — the premise rather than the implementation.
The governing fact is that there are no deployed clusters before 1.0, so there is no older peer a new build has to talk to. A hard partition mid-upgrade cannot happen when there is nothing to upgrade from. The doc also notes the consequence: while floor equals ceiling, every There is also a sequencing problem independent of the pre-1.0 policy. The change bumps On the One observation from the PR was right and has been fixed separately: When the window is genuinely wanted after 1.0, the |
Fixes epic #165 High #5 (wire version hard-partition mid-upgrade). Replaces the exact-equality join gate with a range window [min_wire_version, CLUSTER_WIRE_FORMAT_VERSION] so mixed-version clusters can form (N-1 rolling upgrade).
Verification: nodedb-types+nodedb 6246 pass, cluster lib 1023/1023, clippy 0, zero exact-equality gates left, maya-gate clean 12/12. Note: 32 rustdoc broken-intra-doc-link errors are PRE-EXISTING in untouched files (tracked separately).
Part of #165.