Repository navigation
Fix oversized TN WAL records before Log Service append - #31380
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? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 2a9730daa863304e932653fe2386017ef60d7cf5
Assessment: request_changes
Reviewed the complete 25-file delta, linked issue and frozen discussion. Final-size admission belongs at the chosen WAL owners, but the new rejection path mishandles catalog rollback. The author's nonappendable-object fix is supported by passing controls; it does not resolve this separate, reproduced catalog defect.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1517-7f90-b3f9-c5f9f9e7031b · slot 0 · generation 1
- P1
pkg/vm/engine/tae/txn/txnbase/txnmgr.go:752: A transaction containing CREATE TABLE exceeds the final command-size or configured WAL-record limit after CollectCmd assigns CSNs.
Impact: PrepareRollback removes the catalog MVCC node, but the nonzero CSN subsequently selects full ApplyRollback, which dereferences the removed node. The apply worker panics before DoneApply, leaving Commit blocked instead of returning the size error. Correct the late-rollback lifecycle so detached catalog nodes are not applied again while other cleanup completes; add catalog-operation and subsequent-commit regressions.
Evidence: Current-head TestReviewOversizeCatalogCreate commits a normal CREATE control, then injects maxWalSize=1 for another CREATE. It logs a nil-pointer panic through mvccchain.go:164, table.go:2076 and store.go:786; Commit remains blocked until the 45-second timeout. Reproduction: /home/xupeng/.local/state/mo-bot/jobs/f301b2b92dfbbab326fe2fa0/attempt-1/overlay.json and wal_rollback_probe_test.go; output catalog-probe.log:170; exact command/source/exit receipt checks/1793099466446644989-4.json. The existing lifecycle warning at store.go:775-780 independently explains the failure.
Validation:
-
Artifacts retained under /home/xupeng/.local/state/mo-bot/jobs/f301b2b92dfbbab326fe2fa0/attempt-1. check-ledger.json correlates commands, source fingerprints, exits and log hashes.
-
Isolation preflight passed. Native prerequisites were built through the repository make owner from matching exported inputs; native-provenance.json records input and artifact hashes.
-
Ten focused tests across five packages passed, covering encoded sizing, LSN continuity, rollback, waiter completion and transfer-page cleanup: focused-controls.log and checks/1793099501828106009-4.json.
-
The independent catalog rejection probe failed with the reproduced product behavior; it was not a setup failure.
-
Final audit confirmed unchanged source, the frozen delta and complete unique coverage of all three discussion keys: discussion-assessment.json, review-audit.log and checks/1793100037411520608-4.json.
Limitations:
-
The reproduction uses an injected one-byte threshold through the real engine transaction path, not a 70 MiB SQL/TKE workload. DROP/ALTER variants were not runtime-tested.
-
Full-suite, race and TKE validation were not rerun. Reported remote merge results lack retained local receipts; the frozen exact-head CI snapshot does not establish substantive UT/BVT success.
-
Serialization scheduling, peak memory and transfer-lock costs were source-reviewed but not benchmarked; no performance-regression-free claim is made.
6ea9dab to
cb7e5e3
Compare
|
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: 1bb77341ff0165bdb9c9bdf0511634f158741dc5
Assessment: approve
Reviewed the complete 31-file delta and discussion. The prior catalog rollback panic is resolved; size admission, rollback completion and cleanup have no actionable unresolved findings.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1517-7f90-b3f9-c5f9f9e7031b · slot 0 · generation 1
Validation:
-
Isolation preflight and native prerequisite build passed.
-
14 focused tests across seven packages passed, including catalog rejection and subsequent commits.
-
Nine lifecycle/concurrency tests passed with -race -count=10: 90 executions.
-
Reused frozen-head CI successes for unit tests, static analysis and both enabled multi-CN BVT jobs.
-
check-ledger.json reconciles receipts and retained logs. Final audit confirmed unchanged source and complete discussion-assessment.json coverage.
Limitations:
-
Local checks used small injected thresholds; no oversized SQL/TKE workload or performance benchmark was repeated.
-
CI evidence is the supplied status snapshot; historical remote validation logs were not independently available.
🚫 Left the queue35 min in the queue, with no time running CI. So far
Reason Pull request #31380 has been dequeued Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
Hint You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. Tick the box to put this pull request back in the merge queue (same as
Times in UTC · dashboard · how the merge queue works |
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #31350
What this PR does / why we need it:
A background merge can add transferred deletes after the existing approximate 70 MiB check. Its final WAL command can then exceed the Log Service receiver's 100 MiB message limit, retry for three minutes, and terminate TN.
Serialize the complete transaction command after
PreApplyCommit, reject an oversized record before allocating a WAL LSN or driver DSN, and roll back that known pre-append rejection. Keep other WAL failures on the existing fail-stop path. Group commits now pack by encoded wire size and flush below the receiver budget. TN can set[LogService] max-wal-record-sizeto a budget at least 1 MiB below a customized Log Servicerpc.max-message-size; the default is 99 MiB for the default 100 MiB receiver.Validation: full tests in
logservicedriver,wal,txnbase,txnimpl,tnservice, anddb; focused race tests for size grouping and post-append rollback. Regression tests cover exact size boundaries, LSN/DSN continuity, rollback after apply, and a subsequent successful commit.CI follow-up (2026-10-27): merged
upstream/mainat1231f06468and fixed the SCApreallocfinding inwal_size_test.goby allocating the DSN slice with the known record count. On[email protected],make -j2 cgoandTestCommitGroupsUseEncodedSizepassed on the updated head. CI run 40459328082 passed SCA, x86 UT, both enabled multi-CN BVT jobs, changed-code coverage (33/41 blocks, 80.49%), andCI Required. The first SCA attempt lost its self-hosted runner; the failed job was rerun and passed in attempt 2.Main advanced during CI. Merged the newer
upstream/mainatbaa83f4b96without conflicts; the WAL files were unaffected. CI run 40470840921 is validating this final merge.Performance: final command serialization now runs before WAL enqueue, so the serialized bytes can be measured and reused instead of serialized in the group commit worker.