Skip to content

fix(disttae): bound long-transaction workspace maintenance and close orphan-cleanup ownership - #30988

Merged
mergify[bot] merged 36 commits into
matrixorigin:mainfrom
gouhongshen:agent/issue-25590-6d5e84a3
Nov 4, 2026
Merged

mergify[bot] merged 36 commits into
matrixorigin:mainfrom
gouhongshen:agent/issue-25590-6d5e84a3

Conversation

@gouhongshen

@gouhongshen gouhongshen commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

Related to #25590

What this PR does / why we need it:

Long explicit transactions repeatedly updating the same primary-key rows rescan superseded workspace history at statement boundaries and during reads. This PR keeps incremental per-table views and compacts superseded entries so maintenance follows the live working set. The issue's UPDATE, REPLACE and DELETE+INSERT cases are covered by focused workspace tests and SQL cases.

Persistence and compaction also need a complete ownership contract: every unpublished object must reserve bounded capacity and remain owned until publication or cleanup. The implementation centralizes that contract in the workspace/engine, retains failed cleanup work, and drains it with bounded batches/backoff and a single shutdown budget. Local writers and remote fragments share the same same-version admission contract running on one build; remote ownership transfer proves the coordinator's intake adoption through the run's own batch-flow sequence/ack/drain barrier, installed in both stream modes (negotiated windowed and no-window alike), and clone-borrowed objects retain their existing owner. No per-feature protocol version, peer-capability gate or legacy fallback exists anywhere in the diff (the design document's r16/r17 records record that removal). Main's #26796 key-index/envelope ownership and Engine.Close shutdown ordering are preserved.

The versioned design carries the operative r17 design, the decision log, the per-round review records with their approval trace, and the per-invariant validation criteria (§7).

Delivered behavior

  • Workspace statement scaling — statement boundaries retire and compact superseded entries, per-table views follow the live working set, and rollback/commit recovery keeps the frontend's statement semantics intact.
  • Ownership and capacity — every persisted-but-unpublished object joins a fail-closed per-object admission bound at creation (insert sinkers, temporary data and tombstone writers, compaction rewriters, direct-S3 writers and the RC tombstone transfer), holds its unit until publication, transfer, or a proven deletion, and stays enumerable by exactly one owner at every instant; the aggregate obligation population stays pinned at the per-engine sums under sustained stalled deletion.
  • Settle and retire lifetimes — a proven deletion retires the ledger membership, the owning workspaces' per-claim capacity, and the transaction's recorded-name copy together; queued recorded names retire through the drain through a holder that never retains the completed transaction's graph; an accepted GC job holds its batch's capacity until the storage call proves the deletion, and a failed or unproven batch requeues losslessly to the bounded retry owner instead of settling.
  • Reuse and reset — writer Reset clears its failure-only staged slice; a reused delegate rebinds its persistent sinkers' capacity hook to the current workspace at Prepare and clears it at Reset, so no execution-scoped workspace reference outlives its transaction.
  • Remote fragments (same-version plane only) — the coordinator's intake adopts every relayed name through the same reservation before a clean run can settle; the adoption/drain barrier exists in both stream modes; a transferred settlement settles the ledger, keeps the adopted objects' recorded-name fate, and tears down the mirror's local workspace and segment claims; owner-scoped retirement keeps CN-wide segment-map scans out of fragment settlement.

Validation

Focused deterministic regressions cover each contract in its owning packages (pkg/vm/engine/disttae, pkg/sql/colexec with multi_update/insert/deletion, pkg/sql/compile, pkg/objectio/ioutil) and at the engine level (pkg/vm/engine/test), with -race legs for every synchronization-bearing change and counterexample-red/green proofs run during review. The context-blind deletion barrier's own failure path is pinned the same way: its release and bounded drain join run through the test's registered cleanup (idempotent against the explicit ordering-oracle release), and TestIssue25590DeleteGateCleanupReleasesParkedWorker proves the state a failing assertion leaves behind holds no parked worker. SQL-visible behavior is pinned by test/distributed/cases/dml/{update,delete,replace}_workspace.* and update_remote_fragment_capability.{sql,result}; every generated result was inspected against the intended semantics. The maintained per-invariant coverage spine and its criteria are recorded in the design document's §7.

Review and validation history

Each review round's finding, repair decision, and outcome is recorded in the design document's review records, with the compact approval trace in that document's header. This description previously carried the per-round execution chronicle as well; it was removed on 2026-10-30 after the delivery review's P2 on the same class in the design document (the repository's review contract excludes per-run evidence and review attestations from tracked delivery). The pre-cleanup design document and description are archived byte-identical outside the tracked repository with the loop controller; per-run CI evidence remains available through GitHub's run artifacts.

  • 2026-11-03 base merge: cleared the CONFLICTING base state by merging origin/main at 523ab21543 (upstream Protect borrowed vector data during in-place mutation #32076 among other advances). The single conflict, pkg/vm/engine/disttae/txn.go, resolved to the union of [Bug] AI-WALK (Txn workspace): repeated mutations degrade super-linearly in long transactions #25590's superseded-entry retirement and Protect borrowed vector data during in-place mutation #32076's borrowed-vector protection: shrinkWorkspaceEntryBatchLocked now returns (retired bool, err error) — borrowed vector data is copied into writable storage before any in-place shrink, an allocation failure propagates before mutation and retires nothing, and a fully-superseded batch still retires through the statement-dump-ordered release. mergeTxnWorkspaceLocked propagates the shrink error, upstream's failure oracle now also asserts that a failed preparation retires nothing, and the branch's deleteBatch test call sites assert the now-fallible path. Post-merge validation: the focused disttae regressions (upstream failure oracle plus the retirement/rollback/mixed-ownership families), the full TestIssue25590* regression family, the multi_update and objectio/ioutil package suites, and go vet across the changed closure all pass through the repository's CGo wrapper.

Known limitations

@mergify mergify Bot added the kind/bug Something isn't working label Oct 23, 2026
@matrix-meow matrix-meow added the size/XXL Denotes a PR that changes 2000+ lines label Oct 23, 2026
@gouhongshen
gouhongshen force-pushed the agent/issue-25590-6d5e84a3 branch from 06c583c to a1aefd5 Compare October 23, 2026 17:23
gouhongshen added a commit to gouhongshen/matrixone that referenced this pull request Oct 23, 2026
…iles

The SCA license job of run 39994645622 failed on this PR: license-eye
reported 12 files added by PR matrixorigin#30988 without a valid Apache-2.0 header.
Nine files (the relay/admission sources, their tests and
txn_issue25590_test.go) carried no header at all; the three r33/r34
disttae tests carried a header with a noncanonical license URL
(http://www.apache.org/licenses-2.0 instead of .../LICENSE-2.0), one
also reflowing the "either express or implied" clause.

All 12 now carry the repository's canonical Matrix Origin Apache-2.0
header, byte-identical to sibling table_meta_reader_r32_test.go which
passes the same check.

Verified with the pinned CI tool (license-eye v0.4.0): the header
check over the 12 files reproduces the CI failure on the pre-fix head
(12 invalid, exit 1) and passes after the fix (12 valid, exit 0); the
full-tree header check reports 0 invalid files (exit 0). Comment-only
change: gofmt -l and parse checks over the 12 files are clean.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mo-bot review · mo-bot-local · review

Commit: 921be87c932825c4d30dff0af7b0dfcbeb2aefa6

Assessment: request_changes

Prior runtime concerns are resolved. One repository-required delivery cleanup remains; the latest approval does not address this artifact requirement.

Model: gpt-6-astra / xhigh

Session: 01a1869d-820c-7212-9788-aecfb86a4141 · slot 0 · generation 2

  • P2 docs/design/20261021-issue-25590-workspace-scaling-and-cleanup-ownership.md:4657: The committed design includes extensive per-run CI/review narratives, although the preexisting repository review contract explicitly excludes review attestations and one-off proof narratives from tracked delivery.
    Impact: Obsolete test-run details and transient evidence become maintained documentation, obscuring the operative design and violating the delivery-artifact requirement. This is a policy finding, not a demonstrated runtime failure.
    Evidence: .agents/skills/mo-self-review/SKILL.md:65–74 establishes the requirement at both base and head. This section records CI jobs, reproduction results and /tmp logs for removed receiver-refusal/R15 tests. Remove or externally archive that chronology while retaining the current design, substantive decisions and compact approval trace.

Validation:

  • Static audit passed: checks/1793304223628960872-4.json matches review-audit.log and the clean frozen head.

  • All 74 discussion entries accounted for in discussion-assessment.json.

  • Reconciled current-head CI successes and supplied author validation; details retained in review-evidence.json.

Limitations:

  • No new Go tests were run for this source-established delivery finding.

  • CI status metadata and author reports were available; their raw execution logs were not supplied.

@aunjgr aunjgr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My earlier failed-delete ownership finding is fixed: failed accepted batches now transfer to the retry queue without releasing capacity. One required delivery-artifact cleanup remains.

@XuPeng-SH

XuPeng-SH commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

mo-bot review · mo-bot-local · done

Commit: 921be87c932825c4d30dff0af7b0dfcbeb2aefa6

Review completed. Read the assessment.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mo-bot review · mo-bot-local · review

Commit: 921be87c932825c4d30dff0af7b0dfcbeb2aefa6

Assessment: request_changes

The failed-delete ownership fix is present. The existing delivery-artifact finding remains; runtime approval does not resolve that requirement.

Model: gpt-6-astra / xhigh

Session: 01a1869d-999c-7481-b340-ae4a63e8cee4 · slot 1 · generation 2

  • P2 docs/design/20261021-issue-25590-workspace-scaling-and-cleanup-ownership.md:4657: The committed design retains extensive per-run CI and review narratives, including a removed receiver-refusal test.
    Impact: This violates the repository’s delivery-artifact requirement and obscures the operative design. Externalize transient chronology while retaining current invariants, meaningful decisions and a compact approval trace.
    Evidence: .agents/skills/mo-self-review/SKILL.md:65–74 excludes review attestations and one-off proof narratives; the rule is identical at base and head. The CI records beginning at lines 4657 and 4718 remain. This confirms the existing policy finding, not a runtime defect.

Validation:

  • Static audit passed: checks/1793357253562126284-2.json matches review-audit.log and the clean frozen head.

  • All 78 discussion keys accounted for exactly once in discussion-assessment.json.

  • Reconciled current-head successful UT, SCA, coverage and multi-CN BVT metadata; receipt and log details retained in validation-ledger.json.

Limitations:

  • This contextual follow-up reused supplied same-head runtime coverage; no new Go tests or exhaustive runtime audit were performed.

  • Raw CI and author execution logs were not supplied.

…ed design record

The 2026-10-30 delivery review of PR matrixorigin#30988 (P2 at the r15 record)
enforced the repository's delivery-artifact contract
(.agents/skills/mo-self-review/SKILL.md): per-run CI/review evidence -
CI run and job identities, local reproduction log narrations, per-head
red/green execution records and review attestations - is excluded from
tracked delivery.

The operative design text (§1-§9), every revision's findings,
decisions and supersessions, and the compact approval trace are
retained unchanged; each implementation round keeps its finding, its
trigger analysis, its decision and its maintained regression coverage,
and now references the executed evidence through the external archive
and GitHub's CI artifacts. The complete pre-maintenance document is
preserved byte-identical outside the tracked repository with the loop
controller (snapshot at head 921be87, sha256
5276bf5f6da64802189ac7cfbd3b38830816d3752212a3fc69dd122c9e165e70).

No design decision, invariant, or validation requirement changes.
@gouhongshen

Copy link
Copy Markdown
Contributor Author

@XuPeng-SH — delivery-cleanup round (P2 at docs/design/20261021-issue-25590-workspace-scaling-and-cleanup-ownership.md:4657): verified valid and in scope, fixed at pushed head c7b40fabac ("docs(design): move the per-round execution chronicle out of the tracked design record").

Your finding re-checked against the contract first: .agents/skills/mo-self-review/SKILL.md:65–74 excludes raw logs, per-run manifests, review attestations and one-off proof narratives from tracked delivery, and keep raw evidence in CI artifacts/external links. The committed design document carried exactly that chronicle — the cited r15 section's CI ROUND RECORD / SECOND FOLLOW-UP / MERGE RENUMBER RECORD blocks narrated CI runs 40257231611 and 40267988027, job identities, three-topology local launches and /tmp/issue25590-* logs for the receiver-refusal/R15 tests that Revision r16 had already removed wholesale — and the surrounding round records carried the same class (per-head introductions, /tmp validation logs, red/green execution narrations, CI-run triage chronicle).

Disposition at c7b40fabac (docs-only; no Go byte changed, no design decision, invariant or validation requirement changed):

  • Removed the per-round execution chronicle in full: every /tmp/… reference, local run/job identity, per-head introduction and red-green execution narration; §7's per-run CI counts; the round-45 r15 record's implementation/CI/renumber chronicle; the rounds 49/54–60 validation-ladder narrations; the round-59 CI-triage chronicle. Post-edit audit: zero /tmp references, zero transient CI run/job identities, zero mo-bot job ids remain (the retained CI run 40395203882 approval-evidence identity and the probe's recorded exit 1 observation are the design-gate trace identities, cited for reproducibility of the recorded approvals).
  • Retained the operative design §1–§9, each revision's findings/decisions/supersessions, every round's finding + trigger analysis + decision + deliberately-unchanged contracts + the maintained regressions with their asserted contracts, the design-checkpoint records with their reviewed-revision sha256/approval identities, and the compact approval trace (header Status + §10 records). Section-header structure is unchanged.
  • External archive: the complete pre-maintenance document is preserved byte-identical outside the tracked repository with the loop controller — state/artifacts/issue-25590/design-chronicle-pre-cleanup-921be87c93.md, sha256 5276bf5f6da64802189ac7cfbd3b38830816d3752212a3fc69dd122c9e165e70 — and the design document's header records that archive identity; per-run CI evidence also remains available on the GitHub runs themselves.
  • The PR description carried the same chronicle class (round-by-round experiment narratives, log-file names, per-head red/green sections), so it was compacted in the same push to problem / resulting behavior / validation / known limits, with the pre-maintenance description archived alongside (state/artifacts/issue-25590/pr-body-pre-cleanup-20261030.md, sha256 134f7493bf07532dba68115780c3883d8c679fc60bfa51cc29a045fec368ed03); design-record citations in review threads remain the per-round trace.

Static verification for the artifact requirement: the diff is the single design document (332 insertions/885 deletions at review time; LF-only, no trailing whitespace or tabs), the PR head moved 921be87c93 → c7b40fabac, and the fresh CI runs of the new head will re-evaluate the "Documentation whitespace check" and the rest of the lanes.

@gouhongshen

Copy link
Copy Markdown
Contributor Author

@aunjgr — thanks for both confirmations. You verified at head 921be87c93 that the failed-delete ownership fix is present (failed accepted batches now transfer to the retry queue without releasing capacity), and that the one remaining blocker is the delivery-artifact cleanup — the same P2 the mo-bot review cited at docs/design/20261021-issue-25590-workspace-scaling-and-cleanup-ownership.md:4657.

That cleanup is delivered at the freshly pushed head c7b40fabac ("docs(design): move the per-round execution chronicle out of the tracked design record", docs-only, no Go byte changed):

  • The per-run execution chronicle is removed from the tracked design document in full (the r15 CI ROUND RECORD blocks you both cited, every /tmp log reference, local CI run/job identity, per-head red/green narration, and the same class across the round records).
  • Retained: the operative design §1–§9, every revision's findings/decisions/supersessions, each implementation round's finding + trigger analysis + decision + maintained regression coverage, the checkpoint approval identities, and the compact approval trace.
  • The complete pre-maintenance document is archived byte-identical outside the tracked repository with the loop controller (state/artifacts/issue-25590/design-chronicle-pre-cleanup-921be87c93.md, sha256 5276bf5f6da64802189ac7cfbd3b38830816d3752212a3fc69dd122c9e165e70), and the PR description — which carried the same chronicle class — was compacted to problem / resulting behavior / validation / known limits in the same push.

The full disposition (with the post-edit audit: zero /tmp or transient CI-identity references remain) is in the reply to the mo-bot review below. Re-review at the new head whenever you're ready.

@XuPeng-SH

XuPeng-SH commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

mo-bot review · mo-bot-local · done

Commit: c7b40fabac7bef97c517f2323601328ced3256c0

Review completed. Read the assessment.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mo-bot review · mo-bot-local · review

Commit: c7b40fabac7bef97c517f2323601328ced3256c0

Assessment: approve

Prior ownership, capacity, cleanup and lifecycle findings are resolved. The documentation cleanup closes the remaining delivery concern. No actionable unresolved findings remain.

Model: gpt-6-astra / xhigh

Session: 01a1869d-820c-7212-9788-aecfb86a4141 · slot 0 · generation 2

Validation:

  • Reviewed affected ownership paths, failure recovery, remote settlement, regression oracles and all 84 discussion entries; saved discussion-assessment.json.

  • Static audit passed: 73 changed paths and 191 hunks match frozen sources; source remains clean; 64 Go files pass gofmt parsing/format checks; new single-row SQL expectations match independent transaction arithmetic.

  • Receipt checks/1793503442746065635-3.json reconciled with review-audit.log and validation-reconciliation.json.

  • Frozen CI metadata reports successful build, UT, coverage, static analysis and two multi-CN BVT lanes.

Limitations:

  • No local Go tests, race tests, BVT or benchmarks were run. Raw CI and author execution logs were not supplied.

  • The documented crash-mid-queue orphan limitation remains within the accepted design scope.

@aunjgr aunjgr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous accepted-worker deletion failure is now routed into the retry owner without falsely settling capacity. I traced the current queue/reservation/recorded-holder ownership, statement-boundary staging and remote adoption/ACK settlement paths. One verified failure-path test cleanup blocker remains inline. This review does not claim a new local runtime/race run or a complete fresh implementation PASS; green CI and the supplied validation are reused.

@XuPeng-SH

XuPeng-SH commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

mo-bot review · mo-bot-local · done

Commit: c7b40fabac7bef97c517f2323601328ced3256c0

Review completed. Read the assessment.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mo-bot review · mo-bot-local · review

Commit: c7b40fabac7bef97c517f2323601328ced3256c0

Assessment: request_changes

New discussion changes the prior approval: one P2 test-cleanup defect is confirmed. Previously resolved production and design concerns remain closed.

Model: gpt-6-astra / xhigh

Session: 01a1869d-820c-7212-9788-aecfb86a4141 · slot 0 · generation 2

  • P2 pkg/vm/engine/disttae/txn_issue25590_test.go:2339: After Rollback schedules orphan cleanup, a fatal assertion at lines 2344–2351 exits the test before closeDeleteGate runs.
    Impact: The drain worker can remain blocked indefinitely, retaining fixture state beyond teardown. Pool release and context cancellation cannot unblock the private channel receive.
    Evidence: Delete waits at line 1604 on <-gate without cancellation; the sole release is at line 2354, with no registered fallback cleanup. This confirms review_comments:4440766469 and violates the repository's assertion-failure cleanup contract. Register an idempotent release immediately and boundedly join the drain before pool/file-service teardown.

Validation:

  • Read and classified all 88 discussion entries; saved discussion-assessment.json.

  • Static audit confirmed the frozen head, unchanged source, matching patch and failure-path control flow: checks/1793613230783136383-3.json and review-audit.log.

  • Receipt, log and artifact reconciliation passed: checks/1793613275218976177-4.json and validation-reconciliation.json.

Limitations:

  • No new Go, race or BVT tests ran; the finding is established by source analysis.

  • Reused review 5726235176 for unchanged coverage. Its original artifacts and raw CI/author logs were unavailable; supplied CI successes are status metadata only.

…d cleanup

TestIssue25590RollbackHandsOrphanCleanupToEngineGC released its gated,
context-blind Delete only through the body's explicit call after the
synchronous assertions, so a failing require exited through FailNow and
leaked the parked GC worker and the fixture's storage - pool.Release
cannot end a channel wait. gateDeletesAfter now closes through a
sync.Once (idempotent, matching armDeleteBlock/armDeleteIgnoreCtxBlock),
issue25590RegisterDeleteGateRelease registers the release immediately
at the arming - t.Cleanup runs it first, ahead of the pool and fixture
teardown, and joins the engine queue's drain boundedly after the
release - and the explicit body release stays the ordering oracle. The
new TestIssue25590DeleteGateCleanupReleasesParkedWorker ends its body
at exactly the FailNow state so a teardown-order witness pins the
failure path red/green; the round-62 design record carries the trail.
@gouhongshen

gouhongshen commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor Author

Combined disposition for the two mo-bot-local request-changes findings on the record — correction of this comment's first draft, which mislabeled their sources; the evidence content stands, with each item now attached to its actual review:

(a) The 2026-11-02T09:55:22Z review (review id 5734755552, generation 2, head c7b40fabac) requests changes for exactly one P2: pkg/vm/engine/disttae/txn_issue25590_test.go:2339 — the context-blind deletion barrier released only by the body's explicit call, so a failing require past the arming exits through FailNow and the drain worker stays parked at <-gate (confirming aunjgr's review_comments:4440766469). Fixed at fce13c950c exactly as the review prescribes: gateDeletesAfter now closes through a sync.Once (idempotent release), issue25590RegisterDeleteGateRelease registers the release immediately at the arming so t.Cleanup runs it FIRST — ahead of pool/file-service teardown — and after the release it joins the engine queue's drain bounded (5 s), and TestIssue25590DeleteGateCleanupReleasesParkedWorker proves the FailNow state red/green: with the registration stripped, only the new witness fails (0 delete calls after teardown, want 1); on the fixed tree all three affected tests pass, also under -race; vet/gofmt clean. The confirmed thread PRRT_kwDOFEPiGM6ymrwT is resolved with the fix record, and the round-62 design record in the tracked document carries the full trail.

(b) The r11/r12 approval-traceability request_changes belongs to the mo-bot's generation-1 review of 2026-10-23T21:12:35Z (frozen head 9694277ba9ce13c002cb26063f0fb7cf6b2fc695) — 10 days and several recorded design approvals ago, already superseded by the mo-bot's own per-head lineage (including its APPROVED of 2026-11-01T03:25:07Z on the pre-fix head c7b40fabac). It does not apply to this PR's current line; for completeness, the supersession evidence on the current head:

1. The generation-1 frozen head is disconnected, pre-rebase. 9694277ba9 ("test(disttae): align TestGCFiles with the lossless pool-overload GC handoff") is not an ancestor of the current PR branch (git merge-base --is-ancestor 9694277ba9 <head> exits 1; the commit is reachable only from a local round-36-era backup ref, and no branch containing it includes the PR head). The review's "55 changed files" inventory is the diff of that orphan line; this PR's change against its actual base merge-base 3cf38889bca2 is 73 files (64 Go). Its line references target the document as of that orphan head.

2. The specific P2 text it quotes was mid-flight state, long superseded. At the frozen head, doc lines 2678–2681 carry "r11 is submitted for independent design review; this handler does not self-approve the design gate, and implementation proceeds only after the reviewer's PASS on r11." At the current head, the same subjects carry the recorded outcomes instead:

  • Header approval trace: "PASS at r11 by the round-27 independent design-only review of 2026-10-22 (reviewed content sha256 74edf0d9ba9c2e1711467ef718b08f76b724c1a513b92c716db9547021e5c836); r12 is the recorded post-merge conflict resolution under that PASS, independently covered together with the implementation by the six complete-worktree reviews of 2026-10-23, the sixth approving with no blocking findings (§10 closing record)."
  • §10 closing record: ## 10 design review record - r12 (post-merge conflict resolution) and the 2026-10-23 implementation approval.
  • Revision r11 section: "[r16 supersedes this revision's V_adopt/adoption-line decisions; the round-27 PASS remains the recorded independent approval of the same-version content r16 keeps. See the Revision r16 section.]"
  • Operative design approval: "PASS at r17 by the round-53 independent design re-review of 2026-10-27 (artifact pre-pr-review-1793069602436.json; reviewed content sha256 f2a2d2d0d68c41fd10e889a6357f75f22028c7213bffef6eb31d1fe4b2e18611)", preceded in the trace by the r8–r10 REQUEST_CHANGES records with their successor-resolution rule — so "Explicit PASS records stop at r7" describes only the orphan document's superseded text.

3. The approval artifacts exist and are identified. The r17 PASS artifact and the full pre-pr-review-* series are retained in the external loop archive referenced by the issue board's branch-delivery record ("Design-only PASS for docs/design/20261021-issue-25590-workspace-scaling-and-cleanup-ownership.md, r17, SHA-256 f2a2d2d0…"), independent of the mo-bot retrieval surface that reported evidence.json empty.

@XuPeng-SH

XuPeng-SH commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

mo-bot review · mo-bot-local · done

Commit: fce13c950cc6dbb7a62ad578c616e23bcf8c5a10

Review completed. Read the assessment.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mo-bot review · mo-bot-local · review

Commit: fce13c950cc6dbb7a62ad578c616e23bcf8c5a10

Assessment: approve

The outstanding test-cleanup finding is resolved: gate release is idempotent, registered before fatal assertions, and exercised by a cleanup-only regression. Verified unchanged production and design coverage remains applicable. No actionable findings remain.

Model: gpt-6-astra / xhigh

Session: 01a1869d-820c-7212-9788-aecfb86a4141 · slot 0 · generation 2

Validation:

  • Verified frozen head, clean source, complete change map, and two-file increment since the prior approved head.

  • Three focused cleanup tests passed normally and under the race detector.

  • Both affected concurrency tests passed separate race-enabled runs of 100 repetitions each.

  • Isolation preflight, native-library provenance qualification, git diff --check, and formatting checks for 64 Go files passed.

  • Reconciled all 93 discussion entries. Commands, terminal receipts, logs, and source fingerprints are recorded in validation-evidence.json and final-validation-receipt.json.

Limitations:

  • Prior full-review coverage was reused after source comparison; its original raw artifacts were unavailable.

  • Frozen CI statuses were inspected without raw CI logs. Full-suite, cluster SQL, restart, and performance checks were not rerun for the test-only increment.

Merge origin/main (523ab21) to clear the base conflict. The only
textual conflict was pkg/vm/engine/disttae/txn.go: main's matrixorigin#32076 copies
borrowed vector data before in-place mutation and propagates allocation
failures through shrinkWorkspaceEntryBatchLocked, deleteBatch and their
callers, while this branch retires fully-superseded workspace entries
through the same functions (issue matrixorigin#25590).

The resolution keeps both contracts:

- shrinkWorkspaceEntryBatchLocked returns (retired bool, err error):
  every vector's borrowed data is copied into writable storage before
  any row is shrunk and an allocation failure propagates before
  mutation, leaving the entry's accounting and pending selections
  untouched (upstream matrixorigin#32076), while an entirely-superseded batch is
  still retired through releaseWorkspaceEntryBatchLocked with the
  branch's statement-dump ordering (matrixorigin#25590).
- mergeTxnWorkspaceLocked propagates the shrink error; upstream's
  failure oracle (TestBorrowedWorkspacePreparationFailurePreservesState)
  now also asserts that a failed preparation retires nothing.
- The branch's nine deleteBatch test call sites take two values with an
  explicit NoError check on the now-fallible path.
- All other overlapped hunks merged cleanly with both sides' guarantees
  intact: fileservice's concurrent-deletion IsNotExist swallow lives
  inside main's deleteLocalFile helper; sinker keeps the capacity-hook
  plumbing around main's fetchBuffer/pushStaged/WriteOwned error-path
  ownership fixes; s3WriterDelegate layers main's ShrinkByMask error and
  taken-ownership-on-error semantics over the branch's delegate rebind;
  multi_update's filterTargetRows keeps the reused-delegate workspace
  rebind around main's shrink-failure cleanup; CommitWaitInjected runs
  through scoped fault triggers preserving the branch's commit-barrier
  selectors.

Focused disttae regressions (upstream failure oracle plus the branch's
retirement, rollback and mixed-ownership families) pass on the merged
tree.
@XuPeng-SH

XuPeng-SH commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

mo-bot review · mo-bot-local · superseded

Commit: a07792564a7fb807b34c5ebdc38e5116086e7f82

Review discussion changed before publication; a fresh contextual review is queued.

@gouhongshen gouhongshen left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex automated review

Follow-up review of head a077925, which adds exactly one merge commit (origin/main 523ab21) over the previously reviewed head fce13c9. Disposition of prior blocking topics: (1) aunjgr's P1 successful-transfer remote-workspace leak — fixed earlier via the FinalizeRemoteFragmentWorkspace teardown and unchanged by this merge; (2) aunjgr's accepted-GC-worker unproven-deletion settlement — fixed via requeueFailedGCUnpublishedPending, present at this head; (3) aunjgr's design-doc chronicle — compacted at c7b40fa, untouched by the merge; (4) the context-blind deletion-barrier test cleanup (aunjgr P2, confirmed by mo-bot review 5734755552) — fixed at fce13c9 with an idempotent sync.Once release registered through issue25590RegisterDeleteGateRelease; its regression TestIssue25590DeleteGateCleanupReleasesParkedWorker passes here. The mo-bot approved fce13c9; no prior blocker remains open. New-surface review: the merge's remerge-diff confines manual resolution to pkg/vm/engine/disttae/txn.go plus three test files. The resolution keeps both contracts: upstream #32076's borrowed-vector copy with pre-mutation allocation-failure propagation, and the branch's issue-#25590 fully-superseded-entry retirement (shrinkWorkspaceEntryBatchLocked now returns (retired, err); mergeTxnWorkspaceLocked propagates the error and already discarded the retired flag at the previous head, so no behavior change). Merged deleteBatch is byte-identical to upstream; all 5 production and 11 test call sites handle the new error return. Clean-merge overlap areas named in the commit message (fileservice deleteLocalFile IsNotExist swallow, sinker capacity hook, s3WriterDelegate rebind, multi_update filterTargetRows, CommitWaitInjected scoped faults) compose correctly with the PR's changes intact, and no code references upstream-removed fields (tnID, clusterByIdx). Verification: built the bundled native libs with the documented make cgo target; go build passes for disttae, colexec, compile, objectio and fileservice; 20 focused tests pass on the merged tree — 11 conflict-area tests including upstream's failure oracle TestBorrowedWorkspacePreparationFailurePreservesState plus the retirement/rollback/mixed-ownership families, 2 delete-scan tests, and 7 multi_update delegate capacity/rebind tests. No findings.

@XuPeng-SH

XuPeng-SH commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

mo-bot review · mo-bot-local · done

Commit: a07792564a7fb807b34c5ebdc38e5116086e7f82

Review completed. Read the assessment.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mo-bot review · mo-bot-local · review

Commit: a07792564a7fb807b34c5ebdc38e5116086e7f82

Assessment: approve

Prior findings are resolved or superseded. Workspace retirement and cleanup accounting coherently reuse existing owners; separate reservation, workspace and GC claims preserve distinct lifecycle obligations. The merge preserves borrowed-vector failure handling and empty-entry retirement. No actionable findings remain.

Model: gpt-6.1-sol / max

Session: 01a1a004-9884-72c0-ad39-f096c4209c4a · slot 1 · generation 0

Validation:

  • Reconciled all 73 paths and 97 discussion entries. Reused prior approved coverage after verifying 60 identical source blobs and 69 unchanged file deltas.

  • Formatting passed for all 64 changed Go files. Static audit passed for source/patch identity, discussion coverage, receipt reconciliation and independent SQL-result arithmetic. Records are retained in validation-evidence.json.

  • Frozen-head CI reports 13 successful contexts, including build, UT, coverage, static analysis and both multi-CN BVT lanes; 14 skipped and 2 neutral contexts were not counted as passes.

Limitations:

  • No fresh Go, race, native-build, SQL/BVT or benchmark execution occurred locally.

  • Raw CI and historical execution artifacts were unavailable; reused evidence retains that qualification.

  • The documented crash-mid-queue restart limitation remains accepted.

@aunjgr aunjgr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up review at a077925. My earlier deletion-barrier cleanup blocker is resolved: release is guarded by sync.Once and registered before the fatal assertions, and the added cleanup-only regression leaves release to teardown rather than relying on the normal body. The earlier remote-transfer teardown and failed accepted-GC batch requeue fixes remain present.

I reused my prior review of the workspace/queue/reservation/recorded-holder and remote adoption/ACK closures, then inspected the two first-parent updates: the focused cleanup repair and main merge. The manual txn.go resolution preserves both empty-entry retirement and borrowed-vector preparation/error propagation before shrink/accounting mutation; callers now propagate the fallible shrink/delete contract. No new blocker found in this follow-up. The approved r17 design remains the governing contract; I am not reopening superseded mixed-version requirements.

Validation: reused current-head successful build, UT, SCA, coverage and both BVT lanes, plus scoped author post-merge regression evidence. No new local runtime/race run, and this is not represented as an entirely fresh full-PR audit.

@mergify

mergify Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

✅ Merged into main as 4e0a186 at 15:21 UTC

3 h 36 min in the queue, 1 h 37 min of it CI.

So far

  • ✅ Entered the queue Wed 4 Nov, 11:45 · rule main · triggered by rule Automatic queue on approval for main
  • ✅ Passed · in place
  • ✅ Merged 15:21 · 4e0a186 · squash
3 merge conditions met
  • #review-threads-unresolved = 0 · required by GitHub branch protection
  • github-review-approved · required by GitHub branch protection
  • any of · required by GitHub branch protection:
    • check-success = CI Required
    • check-neutral = CI Required
    • check-skipped = CI Required

Times in UTC · dashboard · how the merge queue works

This branch was previously deployed

1 inactive deployment
ci — 06b13683 Deployed Nov 4, 2026 by mergify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working size/XXL Denotes a PR that changes 2000+ lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants