Repository navigation
fix: filter CHECK violations in LOAD DATA IGNORE - #30355
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? |
…d6b81411634abebcf62b4a71b62c701aff85442
Replace the regression oracle that required the known LOAD duplicate-key bug with explicit planner policy checks and an exact INSERT IGNORE control. Keep LOAD foreign-key rejection in an independent subtest. Validated both owning packages, the full CHECK regression with coverage and matrixone_test tags, go vet, and incremental lint.
|
mo-bot review · Commit: Review belongs to an older commit; it is not a review of the current head. |
Wait for the reader CN logtail to pass the writer commit before opening the assertion query snapshot. Cross-CN autocommit reads otherwise race with logtail application and can miss valid committed rows. Keep every exact warning, rollback, key-reuse, and committed-row assertion. The original missing-row failure reproduced under coverage repetition. The repaired regression passes 20 coverage rounds, focused race validation, go vet, and incremental lint.
Ordinary LOAD now validates declared primary keys after main PR matrixorigin#30421. Update the CHECK-policy test to require one FAIL dedup on the primary key for ordinary LOAD, while retaining the bypass for LOAD IGNORE and the positive INSERT IGNORE arbitration control. Preserve all CHECK placement, barrier and exactly-once assertions across the ten existing cases. Validation: focused matrixone_test coverage cases, complete planner package with vet=all, incremental lint, formatting and diff checks passed.
Merge Queue Status
This pull request spent 2 hours 12 minutes 40 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
Requeued — the merge queue status continues in this comment ↓. |
…d6b81411634abebcf62b4a71b62c701aff85442
Merge Queue Status
This pull request spent 17 seconds in the queue, including 1 second running CI. Required conditions to merge
|
|
Post-merge functional validation on main The separate FK compatibility observation in #30345's comments remains intentionally unchanged: |
What type of PR is this?
Which issue(s) this PR fixes:
What this PR does / why we need it:
LOAD DATA ... IGNOREcurrently warns about a violated CHECK but persists the row because its duplicate-key FAIL policy selects a CHECK assertion rather than a row filter.Pass LOAD's explicit CHECK-ignore policy separately into the shared insert planner. Filter the final assigned/generated row image before deduplication and table/index maintenance, materializing composite unique-lock keys before the filter. Keep the existing LOAD duplicate-key and foreign-key policies and ordinary LOAD's atomic CHECK failure.
Regression coverage uses real LOCAL and server INFILE over the MySQL protocol, immediate warning checks, and exact committed rows from a second CN. It covers multiple and stored-generated CHECKs, NULLs, single/composite unique-key reuse, invalid/valid candidates sharing keys within one load, and ordinary LOAD / INSERT IGNORE / duplicate / foreign-key controls. Planner tests also verify the CHECK barrier precedes fulltext maintenance.
Validation on Go 1.27.1, macOS arm64:
pkg/sql/planpackage passed (28.211s), including existing INSERT IGNORE/ODKU and the new CHECK/fanout regressions.go vetandgolangci-lintpassed. The issues-package lint was rerun after the final test-only edit: 0 issues.CI remains pending. CHECKs are evaluated once per candidate, and rejected rows avoid downstream write work.