Repository navigation
Conversation
Signed-off-by: XuPeng-SH <[email protected]>
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? |
|
This pull request is merged. |
|
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: 7f422c1be6b12d67b4d4567c19636276d4e7326c
Assessment: approve
The change validates offered rows before duplicate arbitration and reuses ordered duplicate-action replay for resulting CHECK constraints. It removes the superseded final-only CHECK path without introducing a separate action stream. No actionable defects remain in the reviewed scope.
Model: gpt-6.1-terra / max
Session: 01a2350e-851d-7031-94fc-615272373c71 · slot 2 · generation 20
Validation:
-
Isolated preflight passed. Focused CHECK-function, planner and compile-operator tests passed; logs and matching receipts are retained in the diagnostic directory.
-
A MySQL-protocol probe passed against fresh one- and two-CN embedded clusters. It covered CHECK and NOT NULL diagnostics, rollback, IGNORE warnings, ordered actions, prepared parameters, INSERT SELECT, nullable LIMIT, composite-unique conflicts and committed readback from the second CN. The two-CN receipt is checks/1796225681344777671-3.json, with odku-sql-probe-v4.log and its retained test source.
-
The first focused test attempt timed out while fetching dependencies; the subsequent run passed.
Limitations:
-
The full BVT and race suites and the reported performance comparisons were not independently repeated; the author reports passes, but their raw logs were not supplied.
-
The two-CN probe verified peer readback, not a forced remote execution pipeline. CI was still in progress or queued in the frozen evidence.
## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Related to #33536. Follow-up to #33687. ## What this PR does / why we need it: The CHECK BVT still expected an invalid incoming row to update an existing row when the duplicate-key assignment had a valid value. #33687 validates the incoming row before duplicate-key arbitration. Keep that input in the script and assert the CHECK violation and the unchanged stored value. Use a valid incoming row with an invalid assignment to cover CHECK on the UPDATE image independently. A valid input and assignment still update the row to 30. Ran both versions of `check_constraint.test` against a local MatrixOne cluster at `d96cdf0c26` with the [failing job](https://github.com/matrixorigin/matrixone/actions/runs/46924549921/job/143622456616?pr=33073)'s mo-tester revision `309a0ca650`. The old script reproduced all 3 failures. The updated script passed 71/71 statements. The full Compose BVT suite was not run locally. Signed-off-by: XuPeng-SH <[email protected]>
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #33536
Fixes #33537
What this PR does / why we need it:
A duplicate-key UPDATE can discard invalid values from the offered INSERT row. Validate the assigned row before duplicate arbitration. A CHECK violation returns 3819 and a NULL in a required column returns 1048. A failed statement leaves existing rows unchanged and rolls back writes from valid siblings.
Use the existing duplicate-action replay to check the changed UPDATE image before the next action. Remove the final-only CHECK path and its synthetic FK eligibility column. The input NOT NULL assertion reads the vector's NULL metadata. CHECK accepts SQL UNKNOWN directly and looks up statement mode only on a violation.
6302cd4e33over 13 runs per workload with 24,000 input rows per run. Median latency in ms was 45.6 to 45.4 for new rows, 88.0 to 84.2 for duplicates without CHECK, 91.6 to 85.2 for duplicates with an unrelated CHECK, and 98.2 to 94.8 for duplicates modifying a checked column. Final row counts and sums matched. Both binaries had outliers on the test host.