Skip to content

TRN-14 PR-A: add fused-pull codec and negotiation helpers - #627

Merged
ketor merged 1 commit into
dingodb:mainfrom
ketor:lr/trn14-fused-protocol-a-current-d75063a3
Nov 28, 2026
Merged

ketor merged 1 commit into
dingodb:mainfrom
ketor:lr/trn14-fused-protocol-a-current-d75063a3

Conversation

@ketor

@ketor ketor commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Scope

TRN-14 PR-A only: pure negotiation helpers plus strict, bounded FPR3 codec and hermetic byte tests. This patch does not implement or enable the fused transport/server protocol.

Exact source candidate: 9828c33fbe33fe26f5b0d07157b45d406500c60b
Parent / actual official-main base: a253a58905ac664b95e1b566c92e043d09df9b6c

Official main advanced after the prior f4b8f9fa validation. The same three-file codec commit was replayed again as a 1:1 patch on the new actual main; all three changed files remain byte-identical (747+/1−), with fresh focused tests, maintained full and CI required on this new exact head. No other branch or source file was changed by this PR, and the older f4b8f9f evidence remains scoped to its earlier base.

Three files:

  • src/transport/dev_frame.h
  • src/transport/rdma_protocol.h
  • test/transport/rdma_fused_protocol_test.cc

Changes

  • Add the proposed, non-default probe bit 7, request bit 56 and readiness bit 3, with pure helpers requiring every local/peer/request/readiness gate. Exclude request bit 56 from max_block_bytes without changing unrelated masks.
  • Add strict FPR3 response encoding/decoding for exact 50-byte status/rejected responses and 98-byte READY responses. Validate native-endian magic, both result kinds, status combinations, previous slot/generation, every reserved byte, embedded DPR2 fields, exact lengths, and trailing bytes with fail-closed behavior and no legacy decode fallback.
  • Preserve legacy zero defaults and frame bytes. Literal tests cover the old default 8-byte probe, complete 66-byte PPR2 request with zero release_generation, and complete 66-byte DPR2 response. Existing default probe/readiness output does not advertise the new bits.
  • Use the existing native-endian PutU32/GetU32 numeric codec. ASCII FPR3 describes the little-endian test byte sequence only, not a network-order conversion or big-endian compatibility promise.
  • Require kind 0 prepare_status and response-prefix value_len to be encoded and strictly decoded as zero; nonzero values are malformed, not loosely ignored.

Hermetic verification

  • Existing focused baseline before the edit: 31 PASS / 0 FAIL.
  • Exact candidate build and focused CTest: 41 PASS / 0 FAIL / 0 SKIP, including 10 new hermetic protocol cases.
  • Fresh JUnit reparse on the candidate: 41 tests, 41 passed, 0 failures/errors, 0 skipped, 10 new.
  • Independent source/test review of the original codec diff: GO / zero must-fix findings for PR-A; this PR replays that same three-file diff byte-for-byte on the current main. A fresh final integrated review is still required.

The tests include literal native-codec bytes, all FPR3 kinds and statuses 1..5, all reserved fields, slot/generation/status/result/kind/magic mutations, exact lengths/trailing data, embedded DPR2 validation, malformed outer envelopes, encoder rejection, and decoder partial-output guards.

Explicit non-goals and boundaries

  • No rdma_transport, rdma_server, runtime configuration, WireOp/wire-status, MW invalidation, connection-pool, pending-grant, stop/teardown, client resource, or server state-machine change is included.
  • The design remains a proposal, not a currently usable negotiated API. Pure helpers alone do not advertise or activate production capability.
  • No new real-RDMA handshake, hardware, payload, generation, timing, throughput, or RTT experiment was performed. In particular, no 2N+1 measurement or performance claim is made.
  • No claim of wire stability, production readiness, MDS/M2/M3/M4 completion, or overall TRN-14 completion.

Future server state (PR-B), client pending-resource ownership (PR-C), and default-off configuration/runtime integration (PR-D) require separate patches, fresh native validation, and independent review. This PR intentionally remains draft while exact-head CI and maintained-full evidence are collected; it is not ready for merge queue.

@ketor
ketor force-pushed the lr/trn14-fused-protocol-a-current-d75063a3 branch from 59a3503 to f4b8f9f Compare November 28, 2026 20:30
@ketor

ketor commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

Exact-head validation — f4b8f9fa7a55d62f297b9dfa82dda48018905c82

Scope remains TRN-14 PR-A codec/negotiation helpers only. The three-file patch is byte-identical to the independently reviewed original codec and was replayed on launch-time official main 1b3b00f7df5b921b3a70a7baf9d908bb4badca73 after the older base advanced.

  • Focused baseline and candidate protocol matrix: 31 baseline cases, then 41 PASS / 0 FAIL / 0 SKIP, including 10 new hermetic FPR3/negotiation cases; raw JUnit independently parsed to the same counts.
  • Public CI run 46186713037, attempt 2: 13/13 completed success on this exact head.
    • Attempt 1 was not discarded: the real two-rail RdmaVerbs.PoolRegistrationDoesNotStallOtherRails threshold failed (27.130454 ms, required <24.3907175 ms; 18 PASS / 12 SKIP / 1 FAIL), and the runtime-image/TSan follow-on steps did not run.
    • Only failed jobs were rerun, without changing source, threshold, timeout or device setup. Attempt 2 ran the full job: registration 110.9 ms, other-rail worst 6.9 ms with 25 qualifying operations; 19 PASS / 12 SKIP / 0 FAIL over the same 31 cases. Runtime-image and RDMA-TSan steps also completed. These measurements are reported directly, not generalized into a median study or claimed as proof about an inherited concurrency root cause.
  • Maintained full on this exact head/tree and launch-time main: discovery 2121, selected/executed 2115, 2017 PASS / 98 SKIP / 0 FAIL after JUnit adjudication (raw 2011 / 104 / 0). All 42 required cases, including all ten RdmaFusedProtocol cases, have direct CTest+JUnit PASS evidence. Unit MainPID 3086859, invocation debada583e9b4f4fa1b76dfac1ff2bf6, actual runner rc=0, later claims/processes released.
  • Independent current-source/provenance review: GO / no must-fix findings. An additional local audit re-derived the source identities and checked 6,964 artifact hashes, all selected cases and lifecycle proof: accepted with no errors.

The first finalizer's PR-metadata schema did not match the actual GH CLI object and its original failed validation history is preserved. Read-only corrected validation accepted the same immutable outputs. A duplicate post-release coordinator operation then failed because the claim was already released; its error is preserved alongside the original unit rc=0 and completed/0 result. No second full or replacement completion history was manufactured. Final integrated independent review evaluated those records and returned scoped GO for exact f4b8f9fa on launch-time parent 1b3b00f7, with no must-fix findings for this revision. That GO explicitly preserves the original failed coordinator cycle and is not current-main ready/queue authorization.

After these runs, upstream advanced again to a253a58905ac664b95e1b566c92e043d09df9b6c (test(m3): verify RDMA payload integrity across engines), with no change to this PR's three files. This PR is not claiming a later-main rebase or later-main full run; those remain owner decisions before any future ready/queue action.

No production handshake, default enablement, server state machine, client pending ownership, MW/connection-pool lifecycle, real fused-RDMA timing/RTT measurement, wire-stability, M2/M3/M4 completion or overall TRN-14 completion is claimed. This PR remains draft, with no ready/merge-queue action from this validation comment.

- Add opt-in pure probe/request/readiness negotiation gates.
- Add strict FPR3 response codecs and hermetic byte-mutation tests while preserving legacy defaults.
@ketor
ketor force-pushed the lr/trn14-fused-protocol-a-current-d75063a3 branch from f4b8f9f to 9828c33 Compare November 28, 2026 21:30
@ketor

ketor commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

Current-main validation — 9828c33fbe33fe26f5b0d07157b45d406500c60b

This is a fresh replay of the same three-file TRN-14 PR-A codec/negotiation patch (747 insertions, 1 deletion) directly on actual main a253a58905ac664b95e1b566c92e043d09df9b6c. Tree is 4a51cc1476554b6f11c5e7a6fc393b65e6481528; all three file bytes and the complete patch are identical to the prior f4b8f9f review. The same draft branch/ref was updated only through the expected previous-head lease. The earlier f4b8f9f validation remains separate history and is not reused as this revision’s result.

  • Focused protocol matrix: 41 PASS / 0 FAIL / 0 SKIP, including all 10 hermetic FPR3/negotiation cases; fresh raw JUnit checked independently. The existing focused baseline remains 31 cases.
  • Fresh CI run 46191920308: 13/13 completed success on exact 9828c33f, attempt 1. Both raw run and check-run metadata were independently verified. Two-rail, shipped-runtime image, and RDMA-TSan steps all completed; no retry or older run is substituted.
  • Fresh maintained full on a253 / 9828c33: discovery 2122, selected/executed 2116, raw 2011 PASS / 105 SKIP / 0 FAIL; JUnit-adjudicated 2017 PASS / 99 SKIP / 0 FAIL. All 42 required cases, including every FPR3 case, have direct CTest+JUnit PASS proof. The only added skip is LseM3RdmaIntegrity.FullPayloadCleanReopenAndLeaseRelease, which requests an explicit fresh NVMe directory and active RDMA device; it is not represented as physical HCA execution.
  • Exact unit MainPID 3488408, invocation d5d9d145a3814415a6caf1953ae41ad2: all source/configure/build/discovery/full-runner stages returned rc=0, successful deactivation occurred, and owner-claim/process release was observed empty. No schema repair, duplicate finalizer, or second full was needed for this revision.
  • Original full archive SHA-256: 6f74913a39569ab669223a0047d1d5bf14c31c4a2c88e797dc6c6e3a3dc34ae3. Independent local reconciliation checked 6,960/6,960 artifact hashes with no errors.

Final independent integrated review returned GO for exact 9828c33f on actual parent a253a589, with no patch-introduced must-fix findings. It directly rechecked source identities, both CI APIs, all 2,116 full-run JUnit files, every required case, all 6,960 artifact hashes, and unit/coordinator lifecycle. This is not production rollout authorization.

Scope stays non-default pure FPR3 codec/negotiation helpers only. No default probe/readiness change, production handshake, server/client/config/MW/pending lifecycle, fused RTT/performance, wire-stability, M2/M3/M4 completion or overall TRN-14 completion is asserted. The two-rail static diagnostic does not prove absence of every inherited native timing defect. This PR remains draft; no ready/merge-queue action is taken by this validation comment.

@ketor
ketor marked this pull request as ready for review November 28, 2026 22:06
@ketor
ketor added this pull request to the merge queue Nov 28, 2026
Merged via the queue into dingodb:main with commit 235d867 Nov 28, 2026
13 checks passed
@ketor
ketor deleted the lr/trn14-fused-protocol-a-current-d75063a3 branch November 28, 2026 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant