Skip to content

fix(csvparser): preserve physical record lines after skipped input - #30325

Merged
mergify[bot] merged 2 commits into
matrixorigin:mainfrom
iamlinjunhong:codex/loom/develop/abae68d14c0013861cf35e00e7151819d6f08b71545a93f302382812c7ed7f29
Oct 19, 2026
Merged

mergify[bot] merged 2 commits into
matrixorigin:mainfrom
iamlinjunhong:codex/loom/develop/abae68d14c0013861cf35e00e7151819d6f08b71545a93f302382812c7ed7f29

Conversation

@iamlinjunhong

@iamlinjunhong iamlinjunhong commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

Related to #30318

What this PR does / why we need it:

__mo_file_line can point to a skipped line when COMMENT or LINES STARTING BY discards input before a CSV record. For #h, a,1, #c, b,2 with COMMENT #, report physical lines 2 and 4 instead of 1 and 3.

Advance the candidate record-start line after each discarded comment or nonmatching STARTING BY line. Keep existing byte/newline accounting and matching lookahead rewind so multiline records retain their first physical line. This adds one scalar assignment per discarded line, with no extra allocation or scan.

Reuse existing parser/external fixtures for combined skips, multiline records, CRLF, small buffers, EOF, Reset and tolerated conversion errors. Extend the existing six-line COMMENT BVT fixture with physical-line metadata and STARTING BY coverage while retaining data/count checks.

Validation: on Go 1.27.1 / macOS arm64, full csvparser and external package UTs passed in normal and race modes (-count=1); configured incremental SCA passed with 0 lint issues; the public-SQL probe passed. Rebased onto main 2508ce7029b03 with exact-tree preservation checked against an independent merge.

The refreshed public-SQL probe uses the existing six-line CSV through the real MySQL frontend, checks rows/counts/physical-line metadata for default, COMMENT and STARTING BY scans, and verifies database teardown across two runs on the same isolated instance. The author's earlier exact mo-tester BVT runs remain historical evidence; they were not rerun in this maintenance update.

Earlier CI failed checkpoint and CN-scale-down tests; no causal link to this CSV delta has been established. Fresh remote CI remains pending. Keep #30318 open after merge for the reporter to verify.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@matrix-meow matrix-meow added the size/M Denotes a PR that changes [100,499] lines label Oct 15, 2026
@mergify mergify Bot added the kind/bug Something isn't working label Oct 15, 2026
@XuPeng-SH
XuPeng-SH force-pushed the codex/loom/develop/abae68d14c0013861cf35e00e7151819d6f08b71545a93f302382812c7ed7f29 branch from fdf5a8e to 2a6d767 Compare October 18, 2026 12:52
@XuPeng-SH

Copy link
Copy Markdown
Contributor

本轮维护更新:rebase 到 main 799523418e9f941afd65cd440d24e7fa0003a35e,新提交 2a6d7674fc59809cae25f95ab84f62be844f9b21。

仅 rebase。原 CI 的 CDC DebugUpdateCNLabel/HAKeeper RPC 超时未建立与 CSV 修改的因果关系,未改动 CDC。

本地验证:受影响路径的普通 UT、单轮 race 和完整变更 Go 包范围的增量 SCA 均通过。未运行整套 CI/BVT、GPU 或性能负载;不将历史作者记录标作本轮新运行。

变更保留检查覆盖完整原 PR 与 main 的集成结果;仅保留本轮明确说明的维护增量。新提交的 GitHub CI 结果待运行,原 CI 中未定位或未归因的失败仍需单独跟踪。

@XuPeng-SH
XuPeng-SH force-pushed the codex/loom/develop/abae68d14c0013861cf35e00e7151819d6f08b71545a93f302382812c7ed7f29 branch from 2a6d767 to 78d08ca Compare October 18, 2026 22:58
@XuPeng-SH

Copy link
Copy Markdown
Contributor

已 rebase 到 main 2508ce7029b03e6bb3ac0bd8e66a994d12593664 并推送 78d08ca8d5c200607b070e762f13349569477671,保持原 CSV 修复,无额外生产逻辑变更。完整目录树与独立合并结果一致。

本机 Go 1.27.1 / Darwin arm64 验证:

  • csvparser、external 整包普通 UT 和单轮 race 均通过(-count=1)。
  • 仓库配置的增量 vet/molint/lint 通过,0 lint issues。
  • 使用原六行 CSV 的真实 MySQL 前端验证通过:默认扫描、COMMENT、STARTING BY 的数据、行数和物理行号均正确;同一独立实例运行两轮,每轮验证数据库清理。

实际 gpt-6.1-sol / xhigh 设计与终审通过,session 01a15125-aa8a-7601-8be8-8c1098436379。PR body 已按仓库模板更新。此前 checkpoint / CN 缩容失败未建立与 CSV 改动的因果关系;不声称 rebase 修复它们。新提交的远端 CI 待运行,#30318 仍留给报告者转测确认。

@XuPeng-SH

XuPeng-SH commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

mo-bot review · mo-bot-xupeng · done

Commit: 78d08ca8d5c200607b070e762f13349569477671

Review completed. Read the assessment.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mo-bot review · mo-bot-xupeng · review

Commit: 78d08ca8d5c200607b070e762f13349569477671

Assessment: approve

Reviewed the complete five-file delta and parser/external-reader ownership chain. The two assignments correctly advance record-start metadata after discarded input without changing parsing, newline accounting or multiline-record semantics. No actionable findings remain.

Model: gpt-6-astra / xhigh

Session: 01a14d34-4e51-79a3-a62d-6c9c16279dc8 · slot 0 · generation 0

Validation:

  • Reviewed coverage for combined skips, quoted records, CRLF, EOF, small buffers, reset and tolerated conversion errors. Existing SQL data/count assertions remain intact.

  • Reused frozen exact-head successes for Ubuntu unit tests, Linux arm64 static analysis and both multi-CN BVT jobs; inspected repository selection paths for the affected packages and load_data case.

  • Local source/evidence audit passed: exact head and merge-base, clean checkout, complete delta inventory, whitespace and independent fixture/golden consistency. Receipt: attempt-3/checks/1792369248954496413-3.json; retained source-evidence-audit.log, source-evidence-audit.json and review-notes.json under /home/xupeng/.local/state/mo-bot/jobs/139148d88edd4484a8fd2edd.

  • Earlier attempts contained no completed validation or assessment to reuse.

Limitations:

  • No local Go or BVT rerun; execution evidence was reused from the frozen CI record. Raw CI and author execution logs were not supplied.

  • Related issue #30318 remains open for reporter confirmation, as requested by the PR.

@mergify mergify Bot added the queued label Oct 19, 2026
@mergify

mergify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-19 00:22 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • ✅ Checks passed · in-place
  • ✅ Merged — 2026-10-19 01:14 UTC · at 1ac287caeb695c793f2b4523774048621ee90c90 · squash

This pull request spent 52 minutes 28 seconds in the queue, including 51 minutes 38 seconds running CI.

Required conditions to merge

This branch was previously deployed

1 inactive deployment
ci — 5d2b80de Deployed Oct 19, 2026 by mergify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants