Skip to content

[Bug]: Sustained 1 KiB-row REPLACE falls from 400 to 263 rows/s and hits 111–116s failures on Standard v4.1.0 #27403

Closed

Description

@Ariznawlll

Description

在 JED 的 managed Standard v4.1.0 实例上执行 72 小时大规模持续写入时,批量 REPLACE 无法维持配置的 400 rows/s。随着运行时间和表规模增长,累计吞吐下降到约 263 rows/s,最近约 4.5 小时只有约 134 rows/s,并出现两条持续 111–116 秒后以 broken pipe 失败的写语句。

相同 workflow、相同 workload 参数在 MTY v4.1.1 新实例上累计约 398 rows/s,可达到目标。该对照说明 400 rows/s 是客户端实际施加的目标,而不是从 JED 当前吞吐反推得到的配置值。

本 Issue 记录 managed v4.1.0 现场的大规模持续写入退化,供定位 TN/merge/checkpoint/commit 或 REPLACE 路径的瓶颈;尚未声称已在 official main 复现。

Environment

  • Affected server: 8.0.30-OmniFabric-v4.1.0
  • Deployment: managed Standard, JED
  • Topology visible to tenant: two CN endpoints behind the managed database entry
  • Observation window: 2026-08-18 10:40:13 to 2026-08-20 09:32:47 UTC
  • Workload source: matrixorigin/cloudsigma-gitops commit 25933d06e72567a559422ed0eca05315c9df5da9
  • Latest official main reference at filing time: 94528dcb63d55921b936cda611ea61eb1862ea79
  • main status: not reproduced yet; the SHA above is a version boundary, not a tested build

Endpoints, tenant/account identifiers, credentials, node addresses and payload values are intentionally omitted.

Workload

The attached 72-hour stability job uses:

rows_per_second:                    400
rows_per_batch:                    1000
payload_extra_bytes_per_row:       1024
business_query_interval_seconds:   0
statement_observer_interval:       900s
writer connections:                1
write SQL:                          REPLACE INTO
primary key:                        (run_id, sequence_id)

Each run uses a new run_id, and sequence_id increases from zero. Retried batches are idempotent because the composite primary key is deterministic.

Steps to reproduce

  1. Attach the workload above to an existing Standard instance whose target table already contains tens of millions of rows from earlier soak runs.
  2. Start a new 72-hour run at 400 rows/s, 1000 rows/batch, with 1024 additional payload bytes per row.
  3. Periodically read the maximum sequence_id for the current run_id and compare it with elapsed_seconds * 400.
  4. Aggregate the tagged REPLACE records in system.statement_info by time window, recording count, average/max duration, status and error.
  5. Continue beyond 40 hours and observe whether the client can keep up with the target.

Actual behavior

At 2026-08-20 09:31:37 UTC:

elapsed:                  ~46.86 hours
latest sequence_id:       44,347,999  (~44.348 million rows)
rows expected at 400 rps: ~67.47 million
cumulative rate:          ~263 rows/s
target attainment:        ~65.7%

The degradation continued during the observation:

earlier snapshot:  42.158 million rows at 2026-08-20 04:58:39 UTC
later snapshot:    44.348 million rows at 2026-08-20 09:31:37 UTC
interval rate:     ~134 rows/s over ~4.55 hours

The server-side REPLACE latency was not monotonically increasing, but its baseline and tail became materially worse:

initial windows average:  ~0.085–0.122s per recorded REPLACE statement
later 6h windows average: ~0.299–0.415s
2026-08-20 04:00–09:32 UTC:
  statements:             6,010
  average duration:       ~0.971s
  max duration:           115.638s
  failed statements:      2

The two failures were:

duration=115.638s, err_code=20101, routine send response failed: broken pipe
duration=111.599s, err_code=20101, routine send response failed: broken pipe

Later writes succeeded and the Action remained running, so this was recovery after long stalls rather than a permanent stop. However, retry/recovery did not restore the configured cumulative throughput.

Expected behavior

  • A supported Standard instance should sustain at least the workload's 95% acceptance threshold (>=380 rows/s) for this bounded soak, or expose an explicit capacity/admission error instead of silently falling behind.
  • Batch latency should remain bounded without 110+ second server executions and socket failures.
  • Temporary retryable failures should recover without creating an ever-growing schedule backlog.
  • Data must remain contiguous and idempotent after retry/reconnect.

Stability and controls

  • Affected JED run: one long-running field observation; the issue is not claiming 3/3 reproduction on official main.
  • MTY control: the same workflow commit and workload parameters on a fresh v4.1.1 Standard instance reached approximately 29.324 million rows in 20.45 hours, or about 398 rows/s (~99.6% of target). A 12-minute metadata delta was approximately 409 rows/s.
  • The MTY control differs in release (v4.1.1) and pre-existing table history, so it proves that the workload generator can reach the target but does not isolate the product change or physical-table-state trigger.
  • The deterministic key makes retries idempotent. Full sequence-gap/checksum validation will run at finalization; it was not executed while the soak was active.
  • No DML/DDL was issued during investigation other than the workload itself; diagnosis used read-only metadata and statement_info queries.

Evidence

Both Actions were still in progress at the latest snapshot. The numbers above come from the live target tables and redacted system.statement_info aggregates, not from the Action status alone.

Code analysis

Confirmed at the workload boundary:

  • The scheduler targets one 1,000-row batch every 2.5 seconds.
  • When it falls behind, it advances next_write by the fixed interval and immediately tries subsequent batches; therefore the cumulative shortfall is not caused by a deliberate reduction of the configured target.
  • The writer is single-threaded, so prolonged batch execution/reconnect/retry directly limits catch-up capacity.
  • The server retained two failed REPLACE executions for 111–116 seconds and then failed while sending the response to a client whose socket was already gone.

Root-cause hypothesis, not yet proven: the large existing table/object history plus shared TN background pressure (merge/checkpoint/commit/logtail) increases REPLACE service time until the single writer cannot sustain or catch up with 400 rows/s. Data-plane metrics and logs are required to distinguish that from a REPLACE conflict-detection/flush path bottleneck.

Regression coverage

Add a big-data/stability regression rather than a BVT timing assertion:

  1. Preload the same composite-PK table to at least 50 million rows or an equivalent object/L0 history.
  2. Run 1 KiB payload writes at 400 rows/s for a long enough window to cross merge/checkpoint cycles.
  3. Assert achieved throughput >=95% of target in every bounded window and cumulatively.
  4. Record batch p50/p95/p99/max, retry/reconnect counts, zero-write windows and schedule lag.
  5. Validate sequence continuity, checksum/idempotency and post-reconnect correctness.
  6. Correlate CN/TN/LogService memory, restart/OOM, merge, checkpoint, commit, logtail and object-store metrics.

Related

Activity

  1. added this to the MO-202608 milestone on Aug 20, 2026
  2. added
    kind/bug
    on Aug 20, 2026
  3. added
    severity/s0
    and removed on Aug 20, 2026
  4. added theissue type on Aug 20, 2026
  5. ck89119 commented on Aug 24, 2026

    @ck89119
    Contributor

    基于两个 72 小时 Workflow 的 artifacts、受影响集群现场、执行计划、日志、指标以及 REPLACE 相关代码路径,调查结论如下。

    根因

    问题的主要瓶颈不在 TN commit/checkpoint、锁、LogService、OOM 或节点压力,而在复合主键冲突检测路径:

    REPLACE -> DEDUP JOIN -> 目标表 TABLE_SCAN
    

    (run_id, sequence_id) 上的 runtime filter/裁剪没有将目标表扫描有效收敛到本批输入主键。随着当前 run 的数据量增长,每条 REPLACE 需要扫描的主键数据不断增加;到约 4000 万行后,扫描工作集引发 FileService 缓存剧烈淘汰和大量 S3 读取,最终形成延迟断崖。

    受影响 JED 运行的现场数据:

    当前 run 的 sequence 范围 单条扫描读取量中位数 批次延迟 p50 / p95
    500万–1000万 81.6 MiB 1.48s / 2.66s
    3000万–3500万 145.9 MiB 1.57s / 2.71s
    3500万–4000万 186.9 MiB 1.39s / 2.42s
    4000万–4500万 251.8 MiB 19.9s / 66.9s

    在 2026-08-20 09:30–09:40 UTC:

    • scan p99 从运行初期约 4ms 上升到 36.8s;
    • execute p99 从约 55ms 上升到 28.4s;
    • CN 在 10 分钟内从 S3 读取约 74.5 GiB;
    • 磁盘缓存淘汰从运行初期约 359 次/10min 上升到约 9035 次/10min;
    • 磁盘缓存占用约 9.59/9.66 GB,内存缓存也基本满载。

    慢计划的大部分耗时位于目标表 Table Scan。Multi Update Wait Time 主要是在等待上游 DEDUP 扫描,并不代表 TN 写入或 commit 慢;实际 lock wait 只有毫秒级。同一窗口内,CN commit p99 约 239ms,TN commit p99 约 30ms,LogService append p99 约 22ms。CN/TN 均没有重启或 OOM,TN merge/checkpoint 也正常。

    客户端超时和 broken pipe 的原因

    workload 配置了 30 秒 PyMySQL read timeout。服务端扫描超过 30 秒后,客户端断开连接并重试同一批数据,但原服务端 SQL 仍可能继续执行。例如,同一个 sequence_id=44349000 批次在短时间内出现了 85.44s、75.40s、35.96s 和 12.64s 的多次服务端执行。

    后续的 broken pipe 是服务端尝试向已经被客户端关闭的连接返回结果,是超时的结果,而不是最初根因。重叠重试又进一步放大了扫描和 S3 压力。

    另外,由于 PyMySQL 的 statement-size 限制,每个逻辑上的 1000 行 executemany 实际会被拆成约 776 + 224 两条 REPLACE,因此每个逻辑批次会执行两次冲突检测扫描。

    对照运行结果修正

    已完成的 artifacts 并不支持“MTY 对照稳定达到 400 rows/s”的结论:

    • JED:44,646,000 rows / 72h = 172.2 rows/s,目标达成率 43.1%,共有 1446 次失败尝试/重试;
    • MTY:44,992,000 rows / 72h = 173.6 rows/s,目标达成率 43.4%,同样在接近 4000 万行后出现退化。

    因此,这不能简单归因于 JED v4.1.0 相对于 MTY v4.1.1 的单版本回归。

    修复与验证方向

    产品侧需要让 DEDUP 目标扫描上的复合主键 runtime filter/lookup 真正精确生效,使选中 block 数和读取字节数由输入批次大小决定,而不是随整表规模增长。

    候选提交 14807e8730(fix: add composite primary key runtime filters)与该故障方向一致,但仍需要:

    1. 确认目标 release branch 是否包含该修复;
    2. 在大规模复合主键表上做修复前后 REPLACE 对比;
    3. 除吞吐外,持续检查目标 Table Scan 的 selected block 数和 read bytes,确保其不会随表规模线性增长。

    workload 侧也应避免在写入结果不确定的超时后立即重试:应增加服务端取消或已提交范围确认,防止同一批次重叠执行并放大负载。

  6. Ariznawlll commented on Aug 26, 2026

    @Ariznawlll
    CollaboratorAuthor

    2026-08-26 CloudSigma long-write follow-up

    The current 72-hour 400 rows/s / 1 KiB-row REPLACE soak continues to reproduce the issue pattern on both managed Standard environments:

    • JED v4.1.0: the job is still active, but three independent read-only SELECT 1 probes, issued 10 seconds apart, all failed with ERROR 20508: all CN servers are busy, possibly due to too many active transactions. This is persistent at the observation point, not a one-off client timeout.
    • MTY v4.1.1: writes are still succeeding, but the last one-hour statement_info window for the current run contains 59 successful 1,000-row REPLACE statements, with mean server duration 42.72 s and max 86.77 s. This is about 16.8 rows/s, versus the configured 400 rows/s target.

    No DML/DDL was issued during this follow-up; the evidence comes from the existing workload and read-only probes/aggregates. The exact cause of JED's 20508 requires CN/TN metrics and logs, but the observed scan-driven REPLACE degradation remains consistent with the root cause already described above. Please include this current v4.1.0/v4.1.1 field evidence when verifying the composite-primary-key runtime-filter fix and confirm the release branch carrying it.

  7. Ariznawlll commented on Aug 27, 2026

    @Ariznawlll
    CollaboratorAuthor

    2026-08-27 seven-day follow-up started

    I updated the long-write workflow at c44f954 and started a new seven-day soak on the retained JED and MTY Standard instances.

    GitHub Actions has a five-day maximum per self-hosted job, so a requested 168-hour customer-volume soak is deliberately split into a 72-hour first phase and an automatically dispatched 96-hour follow-up. The two phases reuse the same instance and table; the second phase is queued after the first phase has produced a report, even if the first phase misses the throughput acceptance gate.

    Current dispatches:

    This is an observation run, not a claim that the defect is fixed. The follow-up will retain the existing scan/throughput/retry evidence for comparison with the composite-primary-key runtime-filter fix.

  8. ck89119 commented on Aug 31, 2026

    @ck89119
    Contributor

    补充本地严格 A/B 结果,并更正我在前一条调查评论中对 PR #27501 的判断。

    结论更正

    PR #27501 修复了普通复合主键 JOIN 的 runtime filter,但没有修复本 issue 的 REPLACE -> DEDUP JOIN -> __mo_cpkey_col 路径。不能把包含 #27501 的镜像视为 #27403 已修复。

    此前评论将现场退化概括为“复合主键 runtime filter 未有效裁剪,并可由 #27501 解释”,这个范围过宽。重新解析现场物理计划和完成相邻提交 A/B 后,更准确的描述是:

    • 现场慢语句的目标 Table Scan 最终只输出 0 或 776 行;
    • 新键通常为0行,客户端超时重试后的已有键为776行;
    • 但为了得到这0/776行,逻辑 Read Size 会随规模增长到约252MiB/语句;
    • 因此问题是 reader/range pruning 阶段付出了随对象/块规模增长的读取成本,不是 DEDUP join 最终比较了数千万输出行。

    1. #27501 的目标能力验证通过

    使用 #27501 squash merge 的严格相邻提交:

    • before:249a458ba567b26d1818fb0496b449135cb05ef2
    • after:ae12701a888fac102e9641cc7cbb8706527366d8

    在100万行表上执行普通复合主键 JOIN + 3个 inline VALUES 键:

    版本 Table Scan blocks Table Scan rows Read Size
    before 128 1,000,000 11.50MiB
    after 3 3 731.16KiB
    v4.1.0 tag 123 1,000,000 11.50MiB

    这证明 #27501 对其目标场景有效,测试环境也能观测到该修复。

    2. REPLACE 路径在 #27501 前后没有变化

    正常对象布局下,复合主键 REPLACE 的结果为:

    版本 100% 新键 50% 已有键 + 50% 新键
    before 0 blocks / 0 rows 2 blocks / 50 rows
    after 0 blocks / 0 rows 2 blocks / 50 rows
    v4.1.0 0 blocks / 0 rows 2 blocks / 50 rows

    随后使用原 Workflow 的精确15列表结构、BIGINT UNSIGNED sequence、1024-byte deterministic JSON payload,以及 PyMySQL 的 776 + 224 statement 拆分,运行到“历史10万 + 当前 run 80万”行:

    • v4.1.0:新键始终 0 blocks / 0 rows,混合键始终 1 block / 388 rows;
    • after:结果相同;
    • 两边均已出现64MiB memory/256MiB disk cache 压力和约1,700次 eviction,但没有扫描量拐点。

    说明“仅缩小缓存”不足以复现,也说明 #27501 没有改变 REPLACE 的隐藏复合主键 DEDUP 路径。

    3. 现场计划是“输出很少,但读取很多”

    重新提取 affected Workflow artifact 中1,741个唯一物理计划:

    当前 sequence 区间 样本数 延迟中位数 Read Size 中位数
    0–10M 84 1.48s 约81.6MiB
    10M–20M 344 1.56s 约117.8MiB
    20M–30M 241 1.50s 约97.7MiB
    30M–40M 414 1.50s 约163.2MiB
    40M–45M 658 19.92s 约251.8MiB

    40M–45M 区间最大延迟达到215.3s。最慢计划读取约257.5MiB,最终只返回776行;部分新键计划读取约256MiB,最终返回0行。

    4. 大量小型 L0 对象可在本地触发同方向退化

    为了缩比对象布局而不复制50GB现场数据,测试采用:

    1. 原 Workflow 精确 schema/payload;
    2. 关闭目标表 auto-merge;
    3. 每1000行 flush 一次;
    4. 生成100个历史对象,再增加当前 run 对象。

    v4.1.0 结果:

    总对象数 总行数 新键 Table Scan Read Size 写批 p95
    200 200,000 200 blocks / 200,000 rows 1.95MiB 0.113s
    300 300,000 300 blocks / 300,000 rows 2.92MiB 0.382s
    500 500,000 500 blocks / 500,000 rows 4.87MiB 0.597s

    500个对象时累计产生18,176次 disk-cache eviction。

    #27501 after 结果同样为200/300/500 blocks 扫描全部已有行;500对象时写批 p95 为0.443s,累计14,401次 eviction。当前 main 34fb54084ca14275989944ae5994ae79e1ab285e 在200对象/20万行时也仍扫描200 blocks/20万行。

    同表可逆验证:

    状态 对象数 总行数 新键扫描 Read Size
    auto-merge 关闭、频繁 flush 100 100,000 100 blocks / 100,000 rows 996.62KiB
    重新启用 auto-merge,合并完成并等待 logtail 2 100,000 0 blocks / 0 rows 81.28KiB

    该恢复过程未执行 ANALYZE TABLE。这证明在本地,大量小型 L0 对象与 REPLACE 的早期裁剪失败存在直接因果关系,auto-merge 后能够恢复。

    当前判断与局限

    当前最强的机制假设是:

    1. 持续小事务产生大量 L0 对象;
    2. __mo_cpkey_col 精确过滤不能在这些对象上形成有效 reader/range pruning;
    3. 新键也需要遍历/读取全部 L0 对象,成本随对象数增长;
    4. 缓存淘汰和对象存储读取放大延迟;
    5. 30秒客户端 timeout/retry 再造成重叠执行。

    但需要明确两个限制:

    • 目前还没有取得现场 merge show,因此“现场也是 L0 积压触发”仍待确认;
    • 本地碎片化场景由 Table Scan 将全部行交给 DEDUP join 再过滤,而现场 Table Scan 最终只输出0/776行。两者精确 filter placement/记账不同;本地直接证明的是对象碎片能够造成同方向的早期裁剪失败和读取放大。

    建议在现场先做只读确认:

    SELECT count(DISTINCT object_name) AS object_count,
           count(*) AS block_count,
           sum(rows_cnt) AS row_count
    FROM metadata_scan('standard_stability.pump_telemetry', 'run_id') g;
    
    SELECT mo_ctl('dn', 'inspect',
                  'merge show -t standard_stability.pump_telemetry');

    重点检查 L0 object count、merge tolerance、queue 和最近 merge 时间。任何手工 merge 或参数调整都应另行评估生产影响。

    后续修复验收应增加“100–500个小型 L0 对象 + 全新复合主键 REPLACE”的集成回归,并断言 Table Scan blocks/rows 不随总对象数线性增长。仅验证 #27501 的普通复合主键 JOIN 用例不足以关闭本 issue。

  9. Ariznawlll commented on Sep 14, 2026

    @Ariznawlll
    CollaboratorAuthor

    测试版本

    • 分支:codex/standard-stability-impl
    • workload commit:31e3e775aa262c3e97fe28290ee55e382ded63e4
    • 最新 main 参考:bb358ea76aeb44a6eed5079616e7e75ba35e75b9(本次为 managed CloudSigma 现场复现,不是 official main 修复验证)
    • 部署方式:CloudSigma managed Standard;JHB、MTY 两个保留实例;单 writer。
    • 测试日期:2026-09-06 至 2026-09-11 UTC。

    原问题验证

    本次两条已完成的 72 小时 soak 使用与本 issue 相同的关键负载:复合主键 (run_id, sequence_id)、REPLACE INTO、1,000 行逻辑批次、400 rows/s、每行额外 1 KiB payload、单 writer,并复用已有历史数据的 standard_stability.pump_telemetry 表。

    环境 实际行数 / 目标行数 目标达成 重试 / 重连 / 恢复 批次平均 / P95 / 最大耗时
    JHB 44,829,000 / 103,680,000 43.2% 1,689 / 1,680 / 152 2.59s / 3.43s / 2,953.49s
    MTY 45,452,000 / 103,680,000 43.8% 1,692 / 1,689 / 167 4.94s / 4.80s / 67,691.47s

    两条任务均达到配置的 72 小时 wall-clock deadline,实例最终仍为 ACTIVE,但均因写入量/逻辑 payload 未达到 95% 验收线而失败。表现与 #27403 中“单 writer 在表规模增长后无法追上固定 400 rows/s,偶发超时/断连后无法恢复累计吞吐”的问题一致。

    本次 artifact 没有采集 EXPLAIN ANALYZE、对象/L0 数或 FileService 读量;因此这里确认的是同一 workload 和同一外部退化形态,不把现场根因进一步断言为某一种 reader/range-pruning 实现细节。

    Happy Path 覆盖

    1. 两个环境均能持续执行 REPLACE 并完成 4,482.9 万 / 4,545.2 万行写入;任务没有永久停机,且实例最终为 ACTIVE。
    2. 写入错误后均发生恢复(JHB 152 次、MTY 167 次),说明 retry/reconnect 路径可恢复部分批次。

    Unhappy Path 覆盖

    1. JHB 记录到 Connection reset by peer、连接超时;MTY 记录到 Connection reset by peer、查询超时及临时 DNS 解析失败。
    2. JHB 单批最长 2,953.49 秒;MTY 单批最长 67,691.47 秒(约 18.8 小时)。长尾阻塞使固定频率调度无法追赶,最终只达目标约 43%。
    3. 两个环境的 statement_info 观察也漏采:15 分钟一次、72 小时理论 288 次,JHB 成功 147 次、MTY 成功 188 次。该指标反映 writer 被长阻塞期间无法按计划完成观察,不作为独立 statement_info 缺陷结论。
    4. 最终按 run_id 的行数/最新事件/重复键验证未完成,报告记录 final validation failed;因此不把当前 artifacts 当作数据正确性通过证据。

    白盒验证

    不适用。本次是 managed CloudSigma 现场运行,仅使用 workflow artifact 中已脱敏的负载事件和聚合指标;未执行节点侧注入、手工 merge 或配置变更。

    回归测试

    未新增回归代码。本 issue 既有的“复合主键 REPLACE + 大表/对象历史 + 长稳吞吐和扫描读取量”方向仍适用;本次结果支持将 JHB、MTY 的同类长稳 field evidence 纳入该验证,而不新建重复 issue。

    测试证据

    测试结论

    测试不通过。

  10. XuPeng-SH commented on Nov 9, 2026

    @XuPeng-SH
    Contributor

    转 QA 验证(不是验收通过)。

    关联修复 #32401 已合入 main,merge SHA:da867c90dfaf1c5102ace1a192b358fcc5adbb9c。该修复针对完整物理主键的有界 REPLACE/DEDUP lookup 在旧 NDV 统计下丢失 runtime filter 的路径,保留 exact-IN 预算、编码和 PASS 回退边界。

    已核对本 issue 全部 5 条评论。旧版 managed soak 失败及 #27501 的范围不足是修复前证据,不作为此合并版本已验证失败的结论;当前未发现适用于新修复的已验证反例或未完成开发 follow-up。

    验证证据来自 PR 作者和评审记录,不是本轮本地实测:作者报告固定 16 个新键、8/16 个 L0 对象下,目标扫描由 8/512、16/1024 blocks/rows 降至 0/0,ReadSize 为 0;14 个场景各运行两次通过,相关完整包测试与 REPLACE BVT 783/783 通过。评审在 0093510 上引用构建、Ubuntu UT/coverage、arm64 SCA 和 compose BVT 的成功证据;这些不等同于对 merge SHA 或现场长稳的本轮实测。

    尚未验证:原始大表/历史对象规模、managed 部署及 72 小时吞吐和长尾、最终数据连续性与重试幂等性。建议 QA 在包含上述 merge SHA 的版本上,覆盖 100–500 个小 L0 对象、原 1,000 行逻辑批次及客户端拆分、新键/冲突/混合键、超预算回退和事务内冲突;分别记录扫描块数、读取字节、对象元数据开销、吞吐和取消/重连后的正确性。该修复不承诺对象元数据处理恒定时间,不据此自动要求 4.2 backport。

  11. slyunnn commented on Nov 20, 2026

    @slyunnn

    Regression and extended verification for #27403 (2026-11-20)

    Verification Environment

    • Final performance verification: freshly built main@96bfaa437bd9d535f22b6bd981ad00e277a4a91e, docs: document unsupported MySQL administration statements (docs: document unsupported MySQL administration statements #32974). Actual git_version() was verified. The 129 Actions used isolated, resource-controlled single-CN test slots and the MySQL text protocol via PyMySQL; services and owned data were cleaned up automatically.
    • Earlier functional/path verification used local 2 CN / 1 TN / 1 Log service / Proxy on main@43fa9f43298f9e60d3c903ba2d6c7d47d4d01af9. SQL actually ran through Proxy 6001, CN1 16001 and CN2 16002. These endpoint results are recorded at that commit; the final 129 performance runs were single-CN, not multi-CN throughput tests.
    • The expanded 100/500-object Actions used main@b543648d99395492918ce0a5a3c08a7de952042d, fix: bound wide payload batches in broadcast hash joins (fix: bound wide payload batches in broadcast hash joins #32917).
    • Related fix: #32401, merge da867c90dfaf1c5102ace1a192b358fcc5adbb9c. It preserves a bounded complete-physical-PK DEDUP runtime filter despite stale NDV, while retaining budget/encoding/direction guards and PASS fallback.

    What Was Covered

    • OK: 100/500-object path regression. Verified unmerged L0 layouts with 1,000 rows/object and 1 KiB payload. A 1,000-row new-key batch scanned 0 persisted blocks/rows and read 0 bytes; existing and mixed keys each scanned 1 block with 1,000 and 500 rows. The 776 + 224 new-key split scanned 0 persisted blocks/rows in both statements. Exact replacement-row counts passed.
    • OK: 15-minute bounded throughput. Preloaded 500 L0 objects / 500,000 history rows, enabled auto-merge, then wrote 360,000 unique rows in 1,000-row logical batches. Each of three consecutive 300-second windows achieved 400 rows/s, exceeding 380 rows/s; cumulative throughput was 399.999 rows/s.
    • OK: Batch latency in that run: p50 124.8 ms, p95 142.5 ms, p99 149.9 ms, maximum 156.1 ms; maximum scheduling lag 14.0 ms; actual error retries 0. Runtime logs show 12 target-table merge completions and 3 incremental checkpoint completions during the measured interval. Final container evidence records no OOM kill or restart.
    • OK: Six controlled reconnects replayed the most recent committed batch without increasing logical row counts. Fresh-connection final validation checked unique-key count, sequence range/sum, aggregate payload CRC32 and 1,024-byte payload lengths; history-row count remained correct.
    • OK: Recovered 15-column schema/driver comparison. Used the tracked telemetry DDL from matrixorigin/mo-nightly-regression, script/nesr_continuous_writer.py, source commit 9a50314b0ef06a6d6a6984b1b9c1ada086c8ed4d, file SHA-256 b33c00ca1e553959d5ffc64910057b07440be167c55976733c23baa03f787655. The schema has the same composite PK, ordinary telemetry columns and JSON payload, with no secondary index or FK. The comparison added a deterministic 1 KiB payload field and used real PyMySQL executemany, autocommit disabled and explicit commit.
    • OK: That comparison achieved 120,000 unique rows in 300 seconds (399.997 rows/s cumulatively), with p95 308.5 ms, maximum 324.3 ms, 0 actual retries and 2 controlled reconnect/replays. The driver executed 244 physical REPLACE statements including replay. Final sequence and JSON payload checksum checks passed. Assertions, artifact upload and slot cleanup succeeded.
    • OK: Earlier local owning planner regression TestDedupPrimaryKeyRuntimeFilterWithStaleStats and embedded TestReplaceCompositeKeyPrunesFlushedObjects passed, including budget/rejection controls and transaction-local conflicts in the existing tests.
    • Not covered: Exact replay of the original CloudSigma commit/deployment, a 72-hour managed soak, injected ambiguous-commit/broken-pipe failures, or final-version multi-CN throughput. The original CloudSigma repository and Actions currently return 404; the recovered 15-column source is not asserted to be that exact incident version.

    Findings

    The reconstructed L0-history REPLACE regression is resolved: scanning remains limited to matching keys at both tested object counts, and the bounded workload sustains the requested throughput while merges and checkpoints actually execute. The JSON/15-column/explicit-transaction comparison also sustains the target, covering the material differences from the initial three-column fixture.

    Large-data regression was necessary because object history triggers this path. Verification used the issue's allowed equivalent-object/L0 alternative, rather than claiming a 50-million-row or managed 72-hour replay. The issue asks for a sufficiently long window across merge/checkpoint cycles; it does not mandate 72 hours for every fix regression. The measured cycle evidence and three throughput windows support this bounded acceptance conclusion. The unavailable original version remains an explicit evidence limit, not a claim of exact workload identity.

    MOTR / BVT Coverage

    Reused the existing focused planner and embedded SQL regressions and added the 129 Action path/throughput checks on test branch test/issue-29383-27403-129. No duplicate small SQL-only MOTR case was added: a timing assertion in BVT would not exercise the history/throughput failure. Heavy fixture and workload phases ran serially; runner scheduling was not treated as engine parallelism. Action artifacts contain JSON batch measurements, logs and cleanup evidence.

    Final Conclusion

    Fixed for the reconstructed bounded composite-PK REPLACE regression, validated with equivalent L0 history and sustained-throughput checks as described above. Closing with the original managed deployment and exact historical-version replay limits explicitly retained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugseverity/s0

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions