Repository navigation
fix(load): bound strict CSV boundary probes - #31387
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? |
6bd1ef0 to
30d2e74
Compare
08b1fac to
ee3f6c9
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: ee3f6c97761a44039497210d2b37d193876aa3ea
Assessment: approve
Reviewed the complete delta and frozen discussion. Bounded probing, conservative fallback, cancellation, reader cleanup and scoped error reporting satisfy issue #31326. No actionable findings remain.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1586-7a01-9000-d45e20995cf8 · slot 1 · generation 1
Validation:
-
Full types, bytejson and external package suites passed.
-
SQL regression passed twice on the same embedded cluster, covering error parity, rollback and lossless two-range loading.
-
Both focused reporting tests passed 100 race repetitions; the full types package also passed under race detection.
-
Preflight passed; retained native inputs and outputs were independently verified. Ten completed check receipts were matched to source fingerprints, exit status and logs in /home/xupeng/.local/state/mo-bot/jobs/4ae292fc1a937e1c590e3464/attempt-1/validation-audit.json.
-
Frozen CI reports successful UT, coverage, static analysis and active BVT configurations. Discussion assessment saved; source remains unchanged.
Limitations:
-
Benchmarks measured 3–106 ns additional cost for tested wide-decimal parses, with unchanged allocation counts; accepted as nonblocking. JSON parsing added 16 B/op.
-
No production-scale throughput or remote-storage timing claim is made. Interrupting blocked storage Read/Close remains the file service's responsibility.
✅ Merged into
|
| Condition | Required by | |
|---|---|---|
| ✅ | #review-threads-unresolved = 0 |
GitHub branch protection |
| ✅ | github-review-approved |
GitHub branch protection |
The batch, tested in place
| Condition | Required by | |
|---|---|---|
| ✅ | any of: check-success = CI Required, check-neutral = CI Required, check-skipped = CI Required |
GitHub branch protection |
Times in UTC · dashboard · how the merge queue works
…cf359fa713308fe0ba69c01c569a3f552e0771e
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: - #31326 ## What this PR does / why we need it: Follow-up to merged #31387, which bounded bad-CSV planning probes, suppressed speculative conversion reports and added cancellation. Its 256 KiB cap can also merge a valid long-record file into one effective reader. Keep 256 KiB as a soft stopping threshold and derive a checked hard budget from the execution parser's record-size limit and CSV tokens. An initial fragment and the next candidate can complete. Suffix probing and optional verification share that byte allowance and at most 256 parser calls. When physical probing reaches the former cap, verify each proposed boundary exactly from FileStartOff, including subsequent boundaries. Reject unsafe multiline and BOM restart boundaries, retaining earlier ranges and merging the tail. Each acquired stream closes before another opens, with cancellation and close-error precedence preserved. Validation at `3db81d9d8d19dbf7a93208ca4959fb6f93661f55` (Go 1.27.1, darwin/arm64): - Reproduced the equality regression before the repair: a 6143-byte BOM field becomes 6140 bytes, and valid multiline CSV errors with 20301. Verification now also starts when physical suffix input equals 256 KiB. - Rerun at `192158edb79f3b8e6c1364303b4d2b7ab83b1490` after the first rebase; reused after the final Python-only main update (Go, native and test inputs unchanged): the complete external package and ten strict-load SQL scenarios with `-vet=all`, including seven threshold unit variants and three public equality scenarios. Exact serial/parallel values, retained fanout and safe fallback are asserted. - Configured incremental golangci-lint reports zero issues. Reused pinned molint analysis (built with Go 1.27) exits 0 with an existing unsafe-import diagnostic in untouched `reader_arrow_test.go`; that file and the diagnostic's inputs match the frozen base. Independent design/final review is reused for the identical complete PR patch; the delivery artifact checks pass. - [Earlier Linux/x64 CI](https://github.com/matrixorigin/matrixone/actions/runs/40643822237) is green and is reused for unchanged paths. New-head Linux CI is pending. No new race or throughput campaign was run for this sequential threshold correction. The authoritative `CSVConfigForLoad` mapping and main's parallel-worker isolation remain integrated. The prior short-probe allocation diagnostic was about 88 KiB, confirming the hard cap is not preallocated. The earlier unrelated UT cleanup timeout is tracked in #31545. CI refresh: the two PR commits were replayed onto official main `8f9bcd29ed8c236ec55c13bb9b88267a3a2a79ea`. All five PR files and the complete PR patch remain identical. [Run 40672111550](https://github.com/matrixorigin/matrixone/actions/runs/40672111550/job/122761716321) failed when the single planner race process reached its cumulative 40-minute package timeout; the active case had just started, and no race report or compilation failure was logged. Main now includes #31593's bounded planner scheduling change. This authorized rebase triggers new CI with that change; it does not establish that the timeout is fixed. The superseded run is not rerun. Verification may reread a prefix. Its shared hard cap is about 384 MiB per attempt with the default record limit; distant targets or prefixes with many short records can still reduce fanout. No throughput improvement percentage is claimed. The issue remains open for reporter verification after merge. --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
What type of PR is this?
Which issue(s) this PR fixes:
What this PR does / why we need it:
Strict parallel LOAD boundary planning could scan an entire illegal CSV tail and report each failed type conversion before execution returned the original row error.
Limit each strict probe to 256 KiB and 256 candidate records, then retain confirmed ranges and merge the remaining tail. Propagate cancellation through probing and range planning, with exactly one reader close. Add contextual parse entry points so speculative conversions suppress error reporting while ordinary callers keep their existing values, errors and reporting. The regular CSV reader keeps its existing buffer size.
Validation on darwin/arm64, Go 1.27.1:
Very long records or illegal prefixes may reduce parallelism by exhausting the probe budget. Blocking storage Read/Close remains owned by the file service. The issue remains open for the reporter to verify after merge.
CI refresh validation (
ee3f6c97761a44039497210d2b37d193876aa3ea, official based4ffbae43d55da21526eab01722cbef14bb01ed5):git range-diff; all 20 PR source/test files are byte-identical to published head08b1fac9dc54a4120f470ac4a6d88a2d469a1689. No functional change was added to this PR..agents/skills/mo-dev/scripts/mo-cgo-test -v -count=1 -timeout=240s -run '^TestLoadCSVStrictProbeFallback$' ./pkg/tests/sqlintegration— PASS (7.637s), all three 601-row scenarios: serial error/rollback parity, invalid-tail fallback and complete valid two-range loading. Test services and leases closed cleanly.Quiet speculative type conversions retain normal parser configuration/resource-limit diagnostics; blocked storage Read/Close remains file-service-owned.