Repository navigation
Description
Description
LOAD DATA ... FORMAT='parquet' PARALLEL 'true' has a severe performance regression when the projected schema contains Parquet LIST columns mapped to MatrixOne vector types.
After #29111, projecting a supported LIST-to-vector column switches the complete projected row from the page-vectorized path to logical row mode. On the official 100M-row, 31-column Parquet type-conversion fixture, the same LOAD that previously completed in about 44.5 minutes does not finish within the 180-minute nightly timeout.
This is an S-1 main-line big-data regression. It blocks the official Parquet type-conversion workload, but it is not an OOM: no MO container restarted and no OOM signature was found.
Environment
- Branch:
main - Failing commit:
c154cf5a0449b5b7c2b497ffc57924a04e74dd52 - Current main checked:
3727c5c5436ca136d7b0312f75bc223a11692a85 - Relevant Parquet source files are unchanged between the failing commit and current main.
- Deployment: TKE, 3 CN + 1 DN + 3 Log + 2 Proxy
- Namespace:
mo-big-data-commit-c154cf5-suite-1y - Date: 2026-09-22
Steps to reproduce
Create the 100M type-conversion target table:
create database parquet_type_conversion_1y;
create table parquet_type_conversion_1y.all_type_parquet_1y (
row_id bigint,
c_tinyint tinyint,
c_smallint smallint,
c_int int,
c_bigint bigint,
c_uint8 tinyint unsigned,
c_uint16 smallint unsigned,
c_uint32 int unsigned,
c_uint64 bigint unsigned,
c_float32 float,
c_float64 double,
c_float_text float,
c_double_text double,
c_decimal decimal(38,10),
c_decimal_sci decimal(38,10),
c_bool bool,
c_char char(32),
c_varchar varchar(255),
c_text text,
c_json json,
c_blob blob,
c_binary binary(16),
c_varbinary varbinary(32),
c_date date,
c_datetime datetime,
c_timestamp timestamp,
c_time time,
c_uuid uuid,
c_enum enum('red','green','blue','yellow','purple'),
c_vecf32 vecf32(3),
c_vecf64 vecf64(3)
);Load the official merged fixture from an S3-compatible object store:
load data url s3option {
'endpoint'='<endpoint>',
'access_key_id'='<redacted>',
'secret_access_key'='<redacted>',
'bucket'='<bucket>',
'filepath'='mo-big-data/parquet_type_conversion_100M_merged.parquet',
'format'='parquet'
}
into table parquet_type_conversion_1y.all_type_parquet_1y
parallel 'true';The nightly reproducer is:
cases/big_data_test/02_LOAD_DATA/15_load_parquet_type_conversion_100M.sql
Actual behavior
- The LOAD starts at
2026-09-22 01:40:24 UTC. - After exactly 10800 seconds, the test client cancels it with
Execution timeout after 10800sand MySQL error 2013. - GitHub Actions then reports
Run Test has timed out after 180 minutes. - CN logs record
context canceledand rollback only after the client timeout; these are cancellation consequences, not the initiating error. - All nine MO containers have restart count
0. - No
OOMKilled, exit code 137, panic, fatal out-of-memory, or CrashLoop was found.
The executing CN's exact-file slow events show forward progress but extremely low throughput:
| Time (UTC) | File offset | Representative Range size | getReader latency |
|---|---|---|---|
| 02:22:59 | 1,033,778,307 | 4 KiB | 617 ms |
| 03:02:56 | 2,040,890,784 | 4 KiB | 550 ms |
| 03:26:30 | 2,627,074,043 | 4 KiB | 566 ms |
| 04:30:20 | 4,196,362,180 | 190,864 bytes | 536 ms |
After almost three hours the load had only advanced to approximately the 4.2 GB offset. The same object has offsets beyond 9.5 GB in the successful control run.
Expected behavior
- Preserve correct reconstruction of LIST vectors that cross Parquet data pages.
- Keep scalar sibling columns on a batched/page-vectorized conversion path instead of converting every projected column one logical row at a time.
- Preserve row-group fanout across CNs and bounded S3 read amplification.
- Complete the official 100M Parquet type-conversion workload within its established runtime envelope and well below the 180-minute job timeout.
Stability and controls
- Reproducer: official main nightly failure, 1/1. One reproduction consumes the full three-hour job timeout.
- Successful control: the same main workflow and the exact same merged fixture on commit
be1591fcompleted in2670695 ms(about 44.5 minutes). - The control run showed similar object-store connection latency, including
getReadercalls around 0.5 seconds and occasional calls above 2 seconds, so COS RTT alone does not explain the new regression. - Control reads were distributed across three CNs and representative Range sizes were generally 16 KiB to approximately 1 MiB.
- Cancellation reached CN rollback and caused no process restart. Target-table atomicity was not queried by this nightly job and is not claimed as verified.
Evidence
- Failed job: https://github.com/matrixorigin/mo-nightly-regression/actions/runs/35673897715/job/106577989126
- Failing commit: c154cf5
- Suspected regression commit: bde7e0c
- Grafana/Loki scope: namespace
mo-big-data-commit-c154cf5-suite-1y, podnightly-regression-dis-tp-cn-zj7ws, terminal window2026-09-22 04:35:24–04:40:54 UTC.
Code analysis
High-confidence regression candidate: #29111 / bde7e0cad8, which fixed LIST vectors split across Parquet V1 data pages.
Before that change, supported LIST-to-vector mappings used the physical leaf column and stayed on getDataByPage. After the change, prepare does the following for LIST-to-vector targets:
physicalCol = col
h.hasNestedCols = trueParquetHandler.getData then dispatches the entire projected batch to getDataByRow. For this fixture, two vector columns therefore force the other 29 scalar columns through logical-row processing as well. Scalar conversions not directly supported by the row path may reset/build a one-row Parquet buffer and invoke the page mapper per row.
The #29111 description explicitly notes that the logical-row path is less vectorized and has higher allocation volume. Its validation used a 50K-row, approximately 449 MB vector fixture; it did not cover a wide 31-column, 100M-row remote object-store LOAD.
This is related to but distinct from #27894: that issue addressed unprojected-column decoding for nested projections. In this regression all target columns are legitimately projected; the problem is that one LIST-to-vector column forces every projected scalar sibling from batched page mapping into per-row mapping.
Other observed errors are not causal discriminators:
iscp transaction finish timeoutalso occurred continuously in the prior successful run.system.statement_infoTEXT-length errors and Proxy close errors are background observability/connection-close noise.
Regression coverage
- Keep the existing big-data case
15_load_parquet_type_conversion_100M.sqlas the scale acceptance test. - Add a focused benchmark containing LIST-to-vector plus many scalar sibling columns. Record page/row-mode time, allocations, Range call count, requested/fetched bytes, row-group fanout, wall time, and peak memory.
- Verify the fix preserves the cross-page vector correctness covered by [Bug]: LOAD DATA INFILE misreads Parquet vector dimension for list<double> #29110/fix: load parquet vectors across data pages #29111.
- Compare
bde7e0^andbde7e0with the same fixture to confirm the regression boundary. - Do not resolve this only by increasing the workflow timeout.
Related
- [Bug]: LOAD DATA INFILE misreads Parquet vector dimension for list<double> #29110 — LIST vector dimension correctness issue fixed by fix: load parquet vectors across data pages #29111.
- [Bug]: External Parquet nested projection disables column pruning and causes massive CPU/allocation amplification #27894 — earlier nested-projection row-mode amplification; closed and not reopened by this report.
- [Performance]: Default Parquet LOAD DATA to parallel and reduce small-range amplification #27899 — Parquet parallel LOAD and small-Range amplification.
- [Bug]: [main tke regression] load parquet file executed about 2h. #24478 — older Parquet nightly timeout with a different full-file read-amplification mechanism.
Activity
daviszhen commentedon Sep 22, 2026
• 不是故障提交 c154cf5。这次测试的是 issue 标注的 current main:3727c5c543。
用 #29229 的 31 列 schema 和你提供的原始 Parquet 文件,在本机单 CN、本地文件环境中,LOAD 成功完成,客户端实测耗时 72
分 35.61 秒。加载后确认 100,000,000 行,首尾行的向量抽样与源文件一致。
这个数字不能代表 issue 中 3 CN + 远端 S3 的耗时,也不能证明故障提交已恢复;c154cf5a044 尚未实测。测试专用实例已停止,
数据保留在测试工作目录 (matrixone-29229-benchmark)。
daviszhen commentedon Sep 22, 2026
Docker A/B 加载测试结果(PR #29111)
使用相同的 Docker 基础镜像、Issue #29229 的 31 列表结构、同一 Parquet 文件
parquet_type_conversion_100M_merged.parquet和相同LOAD DATASQL,分别测试bde7e0c^与bde7e0c:bde7e0c^(d3ecd5e)bde7e0cbde7e0c比前置版本快 216.22 秒(4.47%)。两次均成功加载 100,000,000 行,行数及c_vecf32/c_vecf64首尾样本校验一致。结论:在本次单次、单 CN Docker 测试中,没有观察到 PR #29111 导致加载变慢。但该 Parquet 文件中的
c_vecf32/c_vecf64实际是BYTE_ARRAY STRING标量列,不是 ParquetLIST,因此没有覆盖 PR #29111 新增的 LIST 行模式路径;该结果不能排除真实 LIST 数据或远程 S3/TKE 场景中的性能差异。以上时间是客户端命令 wall time,不是服务端纯 SQL 执行时间。daviszhen commentedon Sep 22, 2026
三次完整加载结果汇总
将当前 main 原生运行、PR #29111 的前置版本 Docker 运行、PR 版本 Docker 运行放在一起比较:
3727c5c,原生运行bde7e0c^,Dockerbde7e0c,Docker结论:
bde7e0c比bde7e0c^快 216.22 秒(4.47%),本次 A/B 没有观察到加载变慢。c_vecf32/c_vecf64是BYTE_ARRAY STRING标量列,不是 ParquetLIST,因此没有覆盖 PR fix: load parquet vectors across data pages #29111 的 LIST 行模式路径。以上时间是客户端 wall time,且每个版本仅测一次;真实 LIST 数据或远程 S3/TKE 场景仍需单独验证。daviszhen commentedon Sep 23, 2026
多 CN Docker A/B 测试结果(PR #29111)
使用相同的 Linux/arm64 镜像构建方式、Issue Schema、Parquet 文件、
LOAD DATASQL、默认make dev-up资源配置(2 CN + TN + Log + Proxy)和独立数据目录,顺序测试bde7e0c^与bde7e0c:bde7e0c^bde7e0cbde7e0c比前置版本慢 489.54 秒(8.96%)。两次均成功加载 100,000,000 行,行数及c_vecf32/c_vecf64首尾样本一致。限制与结论:
issue29182-*多 CN 集群运行了一段时间,存在共享 CPU/内存资源竞争,因此这不是完全隔离的性能基准,不能将 8.96% 直接归因于 PR fix: load parquet vectors across data pages #29111。c_vecf32/c_vecf64是BYTE_ARRAY STRING标量列,不是 ParquetLIST,没有覆盖 PR fix: load parquet vectors across data pages #29111 新增的 LIST 行模式路径。此前同一文件的单 CN Docker A/B 中,
bde7e0c比前置版本快 4.47%;多 CN 与单 CN 结果方向不同,进一步说明需要在无其他集群、真实 LIST Parquet 数据和重复运行条件下继续验证。fix(external): keep parquet scalar siblings vectorized (#29285)
daviszhen commentedon Sep 27, 2026
COS LOAD DATA 二分结果(按 commit 提交顺序)
测试使用同一套
big-data-load-1y.yml、codex/scenario-runner、Issue #29229 的 schema、COS 文件parquet_type_conversion_100M_merged.parquet、LOAD DATASQL 和1y.all_type_parquet_1y表。已知边界:
bde7e0c为通过基线,c154cf5a为 nightly 中已出现 3 小时超时的坏基线。以下按bde7e0c..c154cf5a的 commit 位置升序排列:39cc357e8813404679e5d7afd932Passed tables: 1; failed tables: 0f42330b618b2f178defdb4da0fe652c154cf5a结论:位置 31 的
e5d7afd9326a0d4deaa9f8fb7ee0cbed78a6e011可重复通过,位置 32 的f42330b618f05d117bcaadf9a3fa01f874bd3cc3可重复表现为超过 100 分钟未完成;两者相邻,因此当前二分定位的首个坏提交是f42330b618...([Compatibility]: enforce BLOB/TEXT family byte limits (#29121))。说明:
f42330b618...的坏点判定采用人工 100 分钟取消规则,并非自然运行满 10800 秒后产生的超时日志;重复复跑结果支持该提交是可重复的慢点,但尚未证明它会自然达到 3 小时。daviszhen commentedon Sep 27, 2026
复现与定位结论
基于相同的 COS 文件、LOAD DATA SQL、目标表、严格
sql_mode和 TKE 资源配置,完成了四组对比:e5d7afd932,737,854.33 ms,约 45 分 38 秒,成功f42330b618rowsToSourceBudget二分查找5,115,168.07 ms,约 85 分 15 秒,成功主要瓶颈
f423 的 CN profile 热点集中在:
getDataByPage -> rowsToSourceBudget -> Page.Slice -> optionalPage.Slice -> countLevelsNotEqual/bytealg.Countbytealg.Count约 3,591 CPU-sec,占聚合 CPU 约 61.5%。rowsToSourceBudget累计约 3,747 CPU-sec。newBufferedPage、newOptionalPage、byteArrayPage.Slice产生了数十 GB 的分配。S3FS.ReadCPU 约 129 CPU-sec,不支持“COS 带宽是主要 CPU 瓶颈”的判断。pkg/sql/colexec/external/parquet.go原实现遇到字典页时,对每一行调用Page.Slice(row, row+1);parquet-go 的optionalPage.Slice会重复扫描 definition levels 前缀,因此在大页/大量字典页上接近 O(n²)。二分查找实验将该路径改为对页前缀进行 O(log n) 次切片,最终从 100 分钟未完成降到 85 分钟完成。f423 特有改动的影响
f423 在
pkg/sql/plan/bind_load.go对 BLOB/TEXT LOAD assignment 添加 cast,并在build_constraint_util.go中让 BLOB/TEXT 即使规划器类型相同也必须进行 assignment cast;pkg/sql/plan/function/func_cast.go随后逐值检查字节宽度并复制到目标向量。但 cast 隔离实验在 100 分钟内仍未完成,且 profile 中
strToStr、NewAssignCast的 CPU 占比很小。因此,BLOB/TEXT cast 更像是额外的内存/批次压力放大因素,不是当前超时的首要耗时来源。结论与后续
rowsToSourceBudget重复逐行切片/扫描。限制:f423 的 Pyroscope profile 可取,但 e5 对应 namespace 已无保留 series,因此目前不能做严格同时间窗口的 profile A/B;e5 主要作为耗时和成功率基线。
fix(external): avoid parquet load timeout from blob capacity (#29425)
daviszhen commentedon Sep 28, 2026
在最新
main提交7d117380c67e09fe6e9c7afdb05b09e23c872aef上重新进行了 TKE 多 CN COS LOAD DATA 验证:1y,表1y.all_type_parquet_1ymo-big-data/parquet_type_conversion_100M_merged.parquetExecution timeout、Lost connection或执行失败与参考 run 36366084312(提交
9494371491,约 28 分 09 秒)相比,最新main约快 7 分 05 秒,耗时下降约 25.2%。结论:#29229 的修复在最新
main的 TKE 多 CN COS LOAD DATA 场景下验证通过,并且本次耗时明显低于参考 run。Ariznawlll commentedon Sep 29, 2026
明天测完更新结果
Ariznawlll commentedon Oct 2, 2026
https://github.com/matrixorigin/mo-nightly-regression/actions/runs/36949623257/job/110664629208
已修复