Repository navigation
perf(ci): scope SCA by Go dependencies and shorten freshness BVT - #30442
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: "interrupted" |
|
mo-bot review · Commit: Review belongs to an older commit; it is not a review of the current head. |
|
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: 5b901287d57717157da312eaffc585d1d619896a
Assessment: request_changes
Reviewed the complete eight-file delta and relevant callers and owners. The design appropriately shares Go dependency discovery and analyzer recipes and reuses the existing freshness timer control. No implementation defect was confirmed, but two required execution-validation contracts remain open.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1517-7f90-b3f9-c5f9f9e7031b · slot 0 · generation 1
-
P2
.github/ci/static-analysis.cjs:161: Validation requirement: bounded production and test-only changes now restrict both analyzers to selected packages.
Impact: The verified contract tests use recording analyzer stubs; they do not establish the pinned analyzers' behavior or the reported performance improvement.
Evidence: README.md:54–61 explicitly requires real-analyzer validation. local_validation is empty, frozen SCA remains IN_PROGRESS, and recovered receipts contain no real-analyzer executions. Supply matching command/source/exit records and logs for the reported full, narrow-production, test-only and fallback runs, or execute only the missing modes. -
P2
test/distributed/cases/pessimistic_transaction/fulltext2/fulltext2_async.sql:116: Validation requirement: the freshness deadline changes from 900 to 60 seconds while applying and restoring a process-global interval across CNs.
Impact: Static inspection cannot establish timely periodic refresh, successful fan-out, restoration and cleanup through the actual multi-CN test runner.
Evidence: The documented contract requires normal mo-tester comparison, a same-instance rerun and teardown checks. The author reports successful runs, but supplied and recovered evidence lacks their reports, source/binary identity, commands and exit records. Provide matching retained artifacts or run the changed case twice on a test-owned multi-CN cluster and retain restoration/cleanup evidence.
Validation:
-
Verified clean frozen HEAD, complete delta and tree identity with 7ac9613.
-
Reused 36 passing Node contract tests after independently reconciling 13 unchanged inputs, original clean-source receipts and passing TAP logs. These cover actual Go discovery and Make recipes with analyzer stubs.
-
Current evidence audit passed and verified preservation of every original BVT result line. Records: /home/xupeng/.local/state/mo-bot/jobs/0a54b3a7b5bee21e5e14fcdf/attempt-1/evidence-audit.json and evidence-audit.log; matching receipt: checks/1792193960226899840-4.json.
Limitations:
-
No real-analyzer, native or BVT execution occurred in this attempt. Reported timings remain author measurements without independently reconciled execution artifacts.
-
Production SQL paths are unchanged; added costs are CI graph discovery and temporarily faster background freshness scans during the BVT.
-
The linked issue body and external reusable CI/test-runner implementations were absent from the frozen evidence. Implementation inspection is complete; execution acceptance remains open.
|
mo-bot review · Commit: "interrupted" |
|
mo-bot review · Commit: Review belongs to an older commit; it is not a review of the current head. |
) Parallel non-strict CSV LOAD can split a valid quoted multiline field at a physical newline, causing reader errors or incorrect records. Choose split points by replaying the production CSV parser from the preceding confirmed record boundary. The new `ScanRecord` operation shares framing and header handling with `Read` while skipping the field decoding and unescaping that partition planning discards. Keep best-effort legacy splitting after a CSV syntax failure. Propagate configuration, storage, cancellation and resource-limit errors; close scan readers before fallback; preserve EOF and close-error handling. Retain the configured, overlap-aware physical terminator fallback and bounded worker assignment from main. The SQL regression uses the existing one-CN integration fixture and a service/path-scoped testing threshold, with a private local worker budget capped by CPUs and query `max_dop`. This allows a 58-byte input to exercise real parallel admission and execution without a large fixture. Production thresholds are unchanged. Both LOAD planning entrypoints use the shared admission helper, and observer callbacks receive copied offsets. Validation before the CI follow-up (`mo-cgo-test`, Go 1.27.1, Darwin/arm64): - Full short owning-package tests passed for csvparser, runtime, external, plan and compile, excluding the then-baseline-proven unrelated Arrow fixture. Parser framing/Read interoperation, multiline/custom delimiters, syntax fallback, cancellation/error cleanup and worker assignment regressions passed; full csvparser/runtime race tests also passed. - `TestLoadCSVParallelNonStrictMultiline` passed through the MySQL frontend normally and under race. It observes two actual ranges `[0,39)` and `[39,EOF)` with nominal split 29 inside the quoted field, checks complete multiline/escaped values and exactly IDs 1, 2, 3 without a uniqueness constraint, and checks serial execution. Mutating the observer's private offset copy does not affect execution. - The same SQL regression fails with only the splitter replaced by exact official-base `external.go`: ranges become `[0,36)` and `[36,EOF)`, and LOAD reports mismatched input columns. This is a read-only source overlay retaining the test control. - Incremental golangci-lint across all six changed packages reported 0 issues; vet, gofmt and diff checks passed. CI follow-up and error propagation: - Reproduced the Ubuntu/x86 ordinary and coverage UT failure in `TestReadFileOffsetClosesTailScanReaders/partial_read_error`. The first CSV replay probe now reports the injected storage error immediately; the old test expected three probes from physical-line guessing. Correct the expected reader count to one, retaining the positive-byte-plus-error injection, exact error identity, nil offsets and close-once checks. Retain the remote follow-up's separate JSONLINE three-probe cleanup case and exact open-attempt assertions. No extra production probes are introduced to satisfy the old assertion. - Fix #30446 in the shared CSV parser: COMMENT lookahead and STARTING BY scanning must propagate non-EOF I/O errors. Previously, a one-time read error could be discarded and later reads could produce success. The narrow guards apply to both `Read` and `ScanRecord`, preserving normal EOF and unterminated final records. This adds no retry, state or persistent format change. - Before the correction, all four parser fault-injection cases and the boundary-reader error/cleanup case failed. An exact-main parser-source overlay also reproduced both legacy `Read` failures; this is parser-level evidence, not a full clean-main SQL reproduction. - Rebased onto official main `65bcea5d24610dde1a21bb9f4dea1efd82a8ce50`, including #30442's shared mock PID fixture correction for the other coverage failure. This PR adds no runner-process changes. Current Linux/x86 validation (Go 1.27.1, `mo-cgo-test`, `matrixone_test`, bounded GOMAXPROCS=2): - Full csvparser tests passed normally and under race (0.031s / 1.136s), including COMMENT/STARTING BY one-time I/O errors through both parser entrypoints and final-record EOF controls. - Full external tests passed normally and under race (35.741s / 36.668s), including the CI-named cleanup failure and the new boundary-reader storage-error/close-once regression. The corrected prescan parent test also passed with coverage instrumentation. - The public one-CN `TestLoadCSVParallelNonStrictMultiline` passed normally and under race (8.568s / 8.225s) after the error-propagation correction. - Runtime normal/race tests passed. Incremental golangci-lint across all six affected packages reports 0 issues; vet, formatting and diff checks passed. The repository molint command completed successfully; its diagnostics point to unchanged Arrow/plan/compile code outside this PR. - New remote CI remains pending after delivery. The earlier failed coverage run did not produce a repository-wide coverage verdict. Planning benchmark: approximately 16 MiB, eight ranges, production parser configuration, one excluded warm-up followed by three measured rounds per input/method (`BenchmarkNonStrictCSVBoundaryFraming`, `-benchtime=1x`, measured `-count=3`). Every sample asserts identical boundaries and 16,056,320 bytes read, including read-ahead. Medians on Apple M4, GOMAXPROCS=10: | Input | Read time | ScanRecord time | Read allocations | ScanRecord allocations | | --- | ---: | ---: | ---: | ---: | | Plain CSV | 127.622 ms | 54.555 ms | 323 | 316 | | Escaped multiline CSV | 184.686 ms | 78.803 ms | 1,761,926 | 309 | Escaped-input allocated bytes drop from 21,130,072 to 2,337,472 per operation. These are warmed in-memory boundary-planning measurements; SQL throughput, remote storage latency and concurrent-load effects were not measured. Partition planning still adds a serial framing pass plus per-reader read-ahead and opens. Syntax fallback remains best effort for malformed files. The original #30378 is left open for reporter verification after merge. Approved by: @XuPeng-SH
What type of PR is this?
Which issue(s) this PR fixes:
Refs #29249
What this PR does / why we need it:
Reduce SCA work for bounded Go changes and remove production-cadence waiting from a fulltext freshness BVT, while retaining the existing full gates and every original BVT oracle.
Design
change-scope.cjsfor immutable base/head tree resolution. Missing history, revision mismatch, dirty inputs, uncertain paths, deleted packages and broad closures retain full SCA.SCA_FULL=1override.Common CI fixture correction
The report-open failure fixture shared by #30399 and this PR allowed five mock shards to overwrite one PID file. A controlled truncate-before-write interleaving reproduced exit 94 with all five mock processes still alive. Reuse the admission-owned
owned-pidsledger for survival checks and delete the mock-written PID file. Existing exit-125, artifact-preservation and cleanup assertions remain. Historical CI logs lack the PID snapshot needed to attribute their exact interleaving.Measured local results
Linux/x86, Go 1.27.1, existing pinned molint and golangci-lint v2.14.0, GOMAXPROCS=2, golangci concurrency=1. Analyzer comparisons use independent copies of the same warm analysis cache; the shared Go compiler cache is warmer for the full run because selection runs first. Timings include planning, policy checks and both analyzers.
The two-CN freshness case improved from 920.114s, 223/223 checks to 179.387s, 227/227 checks; a same-instance rerun passed 227/227 in 177.699s. The original 223 checks remain; four statements add control/fan-out/restoration checks.
These are measured examples, not a whole-CI speedup claim. The observed CI case previously took 388s because the default timer phase varies. The opposite BVT group still bounds BVT wall time; no group was dropped or rebalanced. External license/native preparation remains unchanged. This PR itself changes CI/Make inputs, so its SCA deliberately takes the full fallback.
Validation
optoolsfixture correction also passed focused Go race validation.Fixture validation: the complete
optoolspackage passed in Linux/x86 Coverage mode (360 test/subtest pass events, zero skips, 27.403s). The failing subcase passed 100 focused race repetitions (25.527s); incremental go vet, pinned molint and golangci-lint passed (zero golangci issues). No production scheduling script changed.