Repository navigation
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-xupeng · review
Commit: 54ea40ee552edf610ca05d43d029711fed7fe0e9
Assessment: request_changes
The major transaction-pipeline refactor lacks the required linked, reviewed design. This is a confirmed design-contract omission, not a demonstrated runtime defect.
Model: gpt-6-astra / xhigh
Session: 01a15209-2c6d-71e2-b8f3-aa17387fa283 · slot 2 · generation 0
- P2
pkg/vm/engine/tae/txn/txnimpl/table_space.go:65: FreezeApply moves append installation before serialized commit preparation, alongside new writer admission, MVCC ordering, rollback cleanup and asynchronous catalog bookmarks.
Impact: This changes concurrency, ownership and recovery contracts, triggering the repository's mandatory design-first review. Add or link a versioned design covering reservation/publication ordering, rollback before CSN assignment, transfer/replay correctness, lock ordering, resource bounds and validation criteria; record approval of that revision before implementation approval.
Evidence: The 55-file delta contains 2,975 added and 535 deleted production Go lines, including priorityWriterGate, dual MVCC indexes and restart-sealed bookmarks. No design document changes, matching tracked design, linked design revision or design approval appear in the frozen sources/evidence. .agents/skills/mo-dev/references/feature-design-review.md sections 1–2 explicitly require these artifacts for major concurrency/lifecycle refactors.
Validation:
-
Verified exact HEAD, merge-base and clean source. The supplied patch matches the Git delta except its terminal newline.
-
Traced Freeze through txnDB, txnTable and tableSpace, plus early-append rollback, writer-gate and MVCC/catalog ownership changes to establish the design trigger.
-
Static audit passed: checks/1792469164252656931-4.json, exit 0. Report and retained log: /home/xupeng/.local/state/mo-bot/jobs/1faba1d178a421941bd0272e/attempt-1/design-gate-audit.json and design-gate-audit-v2.log.
Limitations:
-
The mo-self-review skill states that missing design approval 'short-circuits full implementation polishing.' Full implementation, concurrency, rollback/recovery and performance validation remain deferred at this gate.
-
No Go/native tests were run. local_validation is empty; the PR's reported focused command selected no tests, so it does not establish behavioral validation.
-
Issue #30623's body was not supplied. Performance figures were assessed as author-reported comparisons, not independently verified measurements.
Keep table-wide allocation limited to selecting and publishing the current carrier, and reserve and materialize under the existing object ownership. Propagate phase cancellation at safe reservation boundaries without removing other transactions' committed carriers or reusing aborted physical offsets. Publish current append-max counts, wire actual bounded phase observations, and remove unused statistics and successful-read diagnostic overhead. Exercise isolation, rollover, cancellation, late padding and lifecycle cleanup through real transactions and strengthen unexpected-error test oracles.
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 51994bd6c65754dbac5e19f0f38e8aa19d90443c
Assessment: request_changes
The approved ownership design is reasonable, and the earlier table-wide lock scope and phase-attribution concerns are addressed. However, the explicit production performance acceptance requirement remains open.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1586-7a01-9000-d45e20995cf8 · slot 1 · generation 1
- P2
docs/design/20261020-apply-append-outside-commit-queue.md:169: Validation requirement: concurrent pessimistic/RC commits now perform reservation and materialization during Freeze, with ReserveAppend and ApplyAppendAt serialized by object admission/MVCC locks.
Impact: The required evidence has not established whether reducing commit-queue work transfers excessive contention or latency into Freeze. Before acceptance, provide controlled matched baseline/current-candidate production-mode runs with verified configuration, isolated TN/CN resources, write-heavy multi-PK queue pressure, separate Freeze/queue p95/p99, comparable CPU/mutex profiles, exact data accounting, and duplicate/WW-error and orphan-transaction checks.
Evidence: Criteria 4 and lines 229–236 explicitly require current-candidate performance evidence. The frozen PR body states that pessimistic/RC acceptance remains open. Its reported 3892.3 versus 4149.2 TPS comparison overlapped unrelated compilation and ambient load; this is not a proven regression. Optimistic/SI results and the padding microbenchmark do not close this requirement. local_validation contains no retained execution receipts or profiles.
Validation:
-
Static audit verified the frozen head, clean source, supplied patch against the assigned range, all 62 changed-file fingerprints, and git diff --check.
-
Successful audit receipt: /home/xupeng/.local/state/mo-bot/jobs/493b8bb3ad2604a55e426925/attempt-1/checks/1792938894785638616-3.json; exit 0 with matching head and clean-source fingerprint. Output is retained in review-static-audit.log in the same attempt directory.
-
Source tracing confirmed table unlocking before object reservation, padding outside allocation locks, cached phase-specific metrics, and removal of the reported successful-read Info logging.
-
Detailed evidence reconciliation is retained in review-gate-record.md. The initial reviewer-script indentation assertion failure and corrected successful audit are separately preserved; neither represents a product test result.
Limitations:
-
Assessment stops at the material acceptance failure. Exhaustive correctness, compatibility, lifecycle and test-quality closure of the remaining MVCC/catalog, transfer and recovery changes is outstanding.
-
No native build, Go unit/race tests, SQL/BVT or performance workloads were executed. Historical author summaries were not counted as independently verified current-candidate passes; current CI execution evidence and the linked issue’s full body were not supplied.
|
Follow-up for commit Remote
The current numbers are from the 60–240-second TN histogram window. Historical columns are separate runs, and the earlier temporary substage probes are not identical in population to the current built-in stage histograms. The current overall transaction stages have about 35,382 samples, while detailed queue stages have about 125,198 observations; do not sum them. Against the prior same-host no-index/full-row-scan candidate, PrePrepare dedup averaged 63.4 → 21.2 µs, and the old |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 7bb1e39082612bc891a124c68664bf73c49aa172
Assessment: request_changes
The ownership design is reasonable, and current source addresses the earlier table-lock scope and phase-attribution concerns. However, the approved performance acceptance requirement remains open. The latest index-first dedup measurements demonstrate a narrower improvement, not controlled production-mode acceptance.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1517-7f90-b3f9-c5f9f9e7031b · slot 0 · generation 1
- P2
docs/design/20261020-apply-append-outside-commit-queue.md:169: Concurrent pessimistic/RC transactions updating distinct keys of the same table execute reservation and materialization during Freeze, including object-level admission and MVCC locking.
Impact: Validation requirement: establish that reducing serialized commit-queue work does not transfer unacceptable contention or latency into Freeze. Provide controlled, matched current-candidate/base production-mode runs with verified configuration, isolated TN/CN resources, queue-saturating multi-PK load, separate Freeze/queue p95/p99, comparable CPU/mutex profiles, exact committed-data accounting, and duplicate/WW-error and orphan-transaction checks. Retain source/build identities, commands, terminal receipts and logs.
Evidence: Criterion 4 requires hotspot and phase-tail evidence; lines 229–236 explicitly require current-candidate results. The frozen PR body still states that pessimistic/RC acceptance remains open. The exact-head follow-up reports optimistic-mode dedup improvement from 63.4 to 21.2 microseconds, but compares separate historical runs with differing histogram populations and explicitly disclaims end-to-end acceptance. Its 83,324-to-60,812 update-count comparison does not establish causality. Functional CI and padding microbenchmarks do not close this requirement; local_validation is empty. This finding asserts an unmet validation contract, not a demonstrated production regression.
Validation:
-
Verified frozen HEAD, merge base, clean source, all 62 changed-file identities, patch equivalence apart from the terminal newline, and passing git diff --check.
-
Static audit passed with checks/1793001923443008438-4.json, matching command, head, clean-source fingerprint and exit 0. Retained review-gate-audit.py, review-gate-audit.log and review-gate-audit.json under the assigned attempt directory.
-
Reviewed the design and supplied discussions; traced Freeze, reservation/materialization, writer admission, index-first dedup and phase metrics against the outstanding acceptance concern.
-
The frozen exact-head CI snapshot reports successful build, UT, static analysis, coverage and proxy/pessimistic multi-CN BVT. These are not performance acceptance measurements.
Limitations:
-
Assessment stops at the material acceptance gap. Exhaustive independent correctness, lifecycle, recovery, compatibility and test-quality review of the remaining delta is not completed or approved.
-
No local native build, Go tests, SQL workloads or benchmarks were executed. Referenced remote benchmark logs and profiles were not supplied locally or independently reproduced.
-
Issue #30623's body was unavailable; requirements were assessed through the frozen PR discussion and approved design.
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: ffc36a3400d2e506bcb0f590cb0efae438796216
Assessment: request_changes
The ownership design and latest lock simplification are reasonable: reservation and sealing share existing MVCC admission. However, the required production-mode performance acceptance remains open, and supplied measurements predate this changed locking path.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1517-7f90-b3f9-c5f9f9e7031b · slot 0 · generation 1
- P2
docs/design/20261020-apply-append-outside-commit-queue.md:169: Concurrent pessimistic/RC transactions execute reservation and materialization during Freeze. This commit removes the freeze lock, while reservation, padding and payload installation still use object-level admission/MVCC synchronization.
Impact: Validation requirement: establish that reduced commit-queue work does not transfer unacceptable contention or tail latency into Freeze. Provide controlled, matched current-candidate/base production-mode runs with verified configuration, isolated resources, queue-saturating multi-PK load, separate Freeze/queue p95/p99, comparable CPU/mutex profiles, exact data accounting, and duplicate/WW-error and orphan checks. Retain build identities, commands, terminal receipts and logs.
Evidence: Design criterion 4 and lines 229–236 require current-candidate performance evidence. The frozen PR description explicitly leaves pessimistic/RC acceptance open. Latest measurements concern parent 7bb1e39 in optimistic mode and disclaim end-to-end acceptance; earlier pessimistic comparisons were contaminated by concurrent compilation and ambient load. No measurements cover ffc36a3's lock changes, and local_validation is empty. This is an unmet validation contract, not a demonstrated production regression.
Validation:
-
Verified frozen HEAD, merge-base, clean source, supplied patch, all 63 changed-file identities and passing git diff --check.
-
Reviewed the complete eight-file follow-up and traced Freeze, reservation, sealing, writer admission, materialization and metric owners. Reconciled the prior static audit without treating it as exhaustive implementation approval.
-
Audit passed with checks/1793013096793202569-3.json: matching command, current-head fingerprint and exit 0. Logs, audit and artifact hashes are retained in the assigned attempt directory.
-
Frozen current-head CI reports successful build, UT, SCA, coverage and proxy/pessimistic BVT; these do not measure performance acceptance.
Limitations:
-
Assessment stops at the material acceptance gap. Exhaustive independent correctness, lifecycle, recovery, compatibility and test-quality closure of the remaining feature is outstanding.
-
No new native build, Go/race tests, SQL workload or benchmark was executed. Historical author measurements were not independently reproduced.
-
The linked issue body was not supplied; requirements were assessed through the frozen design and PR discussion.
XuPeng-SH
left a comment
There was a problem hiding this comment.
APPROVE,针对 ffc36a3400d2e506bcb0f590cb0efae438796216。
复核最新八文件改动及 reservation → sealing → materialization 调用链:冻结判断、AppendNode 注册与行范围预留由同一 MVCC 写锁保护;候选失效重试和取消路径释放 appender 引用,未发现本轮锁简化的具体阻塞缺陷。当前提交的构建、UT、SCA、coverage、proxy/悲观 BVT 及 CI Required 均通过。
调整此前 review 的阻塞尺度:唯一遗留项是设计文档要求的进一步性能验收,现有证据未确认该提交存在性能回退。将其保留为非阻塞跟进,不再仅以此阻塞本次合入。本轮复用了现有评审和当前 CI 证据,没有新增本地测试或压测,也不据此宣称整体吞吐提升或绝对零回退。
Merge Queue Status
This pull request spent 1 hour 5 minutes 12 seconds in the queue, with no time running CI. ReasonThe merge conditions cannot be satisfied due to failing checks
HintYou may have to fix your CI before adding the pull request to the queue again. Waiting for any of
All conditions
Tick the box to put this pull request back in the merge queue (same as
|
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #30623.
What this PR does / why we need it:
Move ordinary transaction
ApplyAppendout of the serialized TN commit queue into concurrent Freeze. Keep ordering-sensitive deduplication, transfer, prepare timestamps, WAL and commit publication in their existing transaction phases. The original design was manually approved by misuxi; the design document now describes the reservation, ownership and cancellation boundaries.The table append mutex selects, validates, creates and publishes the current candidate. It is released before waiting for object reservation. Each attempt reads the current shared candidate, so delayed owners cannot restore an obsolete carrier. Reservation uses the existing object/MVCC synchronization; materialization uses monotonic reserved ranges after releasing allocation locks. Independently committed ordinary carriers survive creator cancellation, and preparing-transfer keeps its existing timestamp/lifecycle contract.
Candidate rejection no longer performs synchronous sealing under the table mutex. Capacity exhaustion and compaction retain that responsibility; an unknown max-commit bound remains conservative. The current Freeze/pre-prepare context reaches safe reservation boundaries without per-row polling. Existing append-max metric publication reads current counts under its publication mutex to avoid stale gauge restoration.
Remove unused metric/statistics plumbing and successful-read diagnostics. Connect bounded cached scan counters and actual Freeze/queue-stage timers. Regression coverage exercises real commits/reads, both object kinds, rollover without surplus carriers, cancelled-creator survival, late materialization, replay/transfer/rollback and unexpected-error handling. Old-source overlays fail the new isolation and sealing regressions at their intended guards.
Current local validation
Linux/x86 follow-up (2026-10-24), head
817b06715df4671fbdf4fa9a37ec00d5827992cb, rebased ontomainatb264f5df894c9e5aba5e852e73f6a5acd80e3614. All 43 prior commits replayed without conflicts; range-diff verified equivalent patches. Two follow-up commits improve padding and fix a replay compatibility defect.Production pessimistic/RC performance acceptance remains open. This update does not claim merge readiness or a full-service TPS improvement. The earlier contaminated performance comparison is not a proven regression; current ambient I/O pressure prevents a controlled production acceptance run.
Corrections and optimization
OnReplayAppendPayloadreaches positional installation, which previously omitted the existingmo_tablesfallback fromrel_idto an absentrel_logical_id. The actual replay entry reproduced NULL instead of 7 while the old sequential append control passed. Both paths now use one predicate based on destination column, authoritative system-table ID and input-column absence. Explicit supplied values, including NULL, remain authoritative. No WAL/disk format or locking change.ReserveRowsLockedowner. Keep one-row appends unchanged; larger gaps reuse vector bulk growth, memory accounting and NULL metadata handling. Preserve delayed payloads and rollback holes, without temporary vectors or new state.Current validation evidence
-race; two additional owning packages contain no tests. There were 1,897 passing test nodes and four existing test skips at the padding revision. After the compatibility correction, revalidated fulltablesandtxnimplnormally and under race (249 passing nodes per mode), plus 52 DB/engine recovery/replay/restart/Freeze test nodes under race. Unchanged closures reuse the earlier valid results.pkg/vm/engine/tae/db/testafter the final correction: 311 passing nodes, one existing skip, 45.807 seconds. Five core owning packages passed normal validation; final changed owners were rerun after the compatibility correction.tablespackage passed all three again. Formatting, diff whitespace and error checks passed. Finalmake buildalso passed using the repository defaults (GOAMD64=v3,GOEXPERIMENT=simd). Go 1.27.1, fresh verified native libraries, repository CGo wrapper,GOMAXPROCS=2, bounded build concurrency and private disk-backed test scratch were used.gpt-6.1-sol/xhigh; its confirmed replay finding was reproduced and corrected. Final re-review at817b06715dpassed for publishing this update; session01a170fb-f30c-7a80-94c2-7403707db017. The full-feature production performance merge gate remains open.Local padding benchmark scope
Sequential original/candidate runs of the committed
BenchmarkReserveRows, three 300 ms samples per size; median nanoseconds/op below. The original productionmnode.gowas overlaid without changing the benchmark. These measure a fresh small memory node, not SQL throughput, complete Freeze latency or the production performance acceptance criterion.At 8,192 rows this operation is approximately 43.7x faster, with Go allocations/op reduced from 40 to 17. One-row allocations remain 16; a bounded reverse-order five-sample check gave medians 2,011/2,037 ns (original/candidate). The single-row measurements do not establish a zero-regression guarantee. No full-service performance benefit is inferred from these microbenchmarks.
Earlier validation receipts
Rebased the existing 41 feature commits onto
mainat3878a13ef00fc85b1bced8a58a4f7d17df848806; the rebase itself preserved the original net patch byte-for-byte. Subsequent fixes were reviewed separately and reconciled with the complete feature.tae/db/test: 312 normal and 312 race selections passed. Direct checkpoint consumer passed normally and under race. Other unchanged owning-package evidence was reconciled after the rebase.-race -count=100. Final repaired test synchronization also passed focused normal/race checks.gpt-6.1-sol/xhighdesign and complete-change reviews were used. Final review disposition: no unresolved material blockers within the reviewed delivery and requested local workload scope; stop at the current D2 lock-boundary fix rather than add an unproven additional admission redesign.Earlier local performance scope (optimistic / SI)
Separate LOG/TN/CN processes, GOMAXPROCS 2/4/4; 128 independent PK update streams, 20-second warmup and 300 seconds active load. No Linux CPU affinity is available on this macOS host. Main has identical temporary timing probes for comparison; they are not part of this PR. Freeze and queue histogram populations differ and must not be added together.
Every sample had zero workload errors, exact final row/sum/commit accounting, drained CN queues and normal service shutdown. The first final-build sample was worse than the first main sample; the tracked follow-up recovered main-comparable throughput and tails. The samples do not establish a stable causal regression or a statistically proven speedup.
For the tracked follow-up, Preparing p95/p99 histogram upper bounds were 0.267/0.669 ms for the final build versus 0.321/0.804 ms for main; PreparingWait was 1.675/2.905 ms versus 2.012/2.905 ms. Freeze was 3.490/6.052 ms versus 0.386/0.804 ms, reflecting the append work moved into that phase. CPU, mutex and block profiles were captured separately. The tracked final-build mutex profile totals 246.86 seconds of cumulative contention versus 15.52 seconds for main, and sampled TN CPU is higher. Same-object reservation remains the dominant final-build mutex frame; removing another lock without demonstrated end-to-end benefit is not claimed as a completed optimization.
The original rebased allocation path and a padding-only intermediate candidate retained dominant table-mutex contention. The final implementation removes that table-wide convoy. Same-object row reservation still requires serialization; its profile attribution is assessed alongside end-to-end results rather than treated as recoverable time by itself.
A reverse-main sample overlapped another project's Rust compilation and is explicitly excluded from performance acceptance. Other observed OS/UI load and brief compiler activity at the end of paired main are retained in the local experiment record. These local runs do not establish a universal no-regression claim for every TP workload.
Production-path follow-up: pessimistic / RC (2026-10-24)
These additional local results refer to source
d91dedb740; no kernel changes were made. The earlier six-row local performance table above was collected in optimistic/SI mode and is not production pessimistic performance proof.mo_transactions()verified both CNs were Pessimistic/RC. Real waiting stacks traversed LockOp and remoteLockTable; TN Freeze counters advanced during SQL commits.Pessimistic performance remains open. One matched 300-second/128-key local comparison, with runtime mode verified:
The candidate sample is 6.19% lower in throughput. Both runs had exact data accounting, drained queues and clean service exits, but both overlapped unrelated Go compilation and ambient OS/UI/VM load. This single pair neither establishes a stable causal regression nor proves zero regression. Same-object Freeze contention remains prominent; the 60-second TN profiles recorded 82.39/49.47 CPU sample-seconds and 206.05/11.03 cumulative mutex-delay seconds (candidate/main). Profile windows differ from aggregate TPS windows, so these are not exact per-transaction cost figures.
The earlier overall review covered its then-measured local scope. It must not be interpreted as closing this newly measured production-mode performance question.
Historical author evidence
Earlier remote results below predate the final local fixes and are retained as historical context, not current-head validation.
The author previously measured remote host
10.222.1.51with CPU affinity, a 128-key/300-second update workload, and broader Sysbench 1000W cases. At the earlier feature heade899f733bd, queue waiting and overall Preparing were lower than the historical main sample; PrepareCommit was still slower. Those separate-run results predate the fixes above and are not final-head evidence. The original discussion and benchmark progression remain in the author follow-up.The earlier Sysbench comparison is available in branch regression and main regression. It is indicative historical context, not a controlled validation of this final build.
This local follow-up does not establish the current remote CI status.
Index-first dedup follow-up (2026-10-26)
Commit
7bb1e3908removes the redundant PrepareTS-ordered AppendNode index and changes in-memory AObject PK dedup to search ART first, then check only matching RowIDs against AppendNode PrepareTS and abort state. The cold flush-retry path scans physical-row-ordered nodes when it needs the latest PrepareTS.On remote host
10.222.1.51, the fullpkg/vm/engine/tae/db/test,tables,updates, andindexwrappertest packages passed; focused race tests passed with-count=5. The optimistic 128-key/128-worker, 300-second full-service update workload completed 60,812 updates with zero errors and exact final row/sum accounting. LOG, TN, CN, and clients were pinned to separate CPU sets.7bb1e3908The current column uses the 60–240-second TN histogram window. The historical columns came from separate runs; their temporary substage probes and the current built-in stage histograms do not have identical sample populations. In the current run, PreparingWait/Preparing have about 35,382 transaction samples, while each detailed queue stage has about 125,198 observations; these stages must not be summed.
Compared with the previous same-host no-index/full-row-scan candidate, PrePrepare dedup averaged 63.4 → 21.2 µs and the 60-second TN CPU profile no longer shows
GetRowSelectionAfterLocked(previously 13.4% of sampled TN CPU). However, full-service throughput fell from 83,324 to 60,812 updates in separate runs, while the broader PrepareWal interval grew from about 191 to 275 ms. This is not a claim of end-to-end performance acceptance; WAL/apply or environmental effects require a controlled follow-up.