Skip to content

[Bug]: main TKE HNSW SIFT128 100 并发查询出现 MergeTop/HashBuild 内存准入错误 #31374

Closed

Description

@Ariznawlll

问题描述

2026-10-27 main TKE Family 周回归中,SIFT128 100 万向量的 HNSW 索引创建成功,但后续 100 并发、5 分钟近邻查询出现 326 次 MatrixOne 服务端资源错误,导致该用例失败。这是现有回归负载下的非预期 SQL 失败,需跟踪定位;目前不能认定为内存泄漏或特定提交引入。

环境与复现

  • 回归:run 40349960473 / TP Tail job 121834219521;测试仓库 SHA e648b56ffb824d849b3aaaa8ae2bc164c945454d。
  • 实际测试 MatrixOne SHA:6c1942f3cf0d4b967864dcc1d67b7884164a2fdb(main);TKE weekly-shadow-1x2,1 TP CN + 2 AP CN,namespace mo-main-family-40349960473-1。
  • TP CN 容器内存上限 55 GiB,GOMEMLIMIT=25000MiB,CN cache=16GiB。GOMEMLIMIT 不等同于 SQL 执行内存上限。
  • 使用 /vector/sift/sift_base.fvecs 加载 100 万条 128 维向量;在 ann.items_sift(embedding) 上创建 HNSW 索引,M=8、EF_CONSTRUCTION=200、EF_SEARCH=64、vector_l2_ops,索引创建成功。
  • 100 个终端运行 5 分钟,查询模式:SELECT id FROM ann.items_sift ORDER BY l2_distance(embedding, <128维查询向量>) LIMIT 1。该 Family 流程同时运行 CDC、MOTR 等负载;是否由共置负载推高内存尚未确认。

实际结果

  • 开始约 98 秒后出现错误;本轮查询成功 384,227 次,失败 326 次,报告 QPS=-1、RESULT FAILED。不能把 326 次错误当作 326 次独立的回归复现。
  • 其中 320 次为错误码 3015:resource exhausted: merge top memory capacity exceeded; reduce LIMIT or query concurrency, or increase processLimitationSize。
  • 另 6 次为 resource exhausted: hash build memory budget exceeded(requested=16384,used 约 26.0–26.75 GB,effective limit 几乎贴近 used)。
  • HNSW 建索引步骤成功;同一 job 后续 3 个 IVF SIFT 用例通过。最终 Enforce planned Vector SIFT outcomes 因 expected=success、actual=failure 报红。
  • 收尾资源记录中 TP CN 为 Ready、restart=0,未见 OOMKilled;这只能排除容器当时已重启,不能替代报错时的内存剖面。同轮 DN 曾较早因另一问题重启([Bug]: WAL 消息超过 100 MiB 后 DN panic 重启,TP/AP 提交状态未知 #31350),目前没有证据证明与本错误有因果关系。

预期结果

该既有 100 并发 HNSW 查询负载应无非预期 SQL 错误,并产出有效性能与召回结果;如资源确实不足,需定位造成准入失败的内存归属、容量边界及是否存在回归。

对照与发生频率

  • 当前已核实:2026-10-27 这一轮 1/1 失败;尚未在更新的 main 提交上复跑,也未定位首坏提交。
  • 此前 6 个同参数周回归样本(10/18、10/19、10/20、10/21、10/23、10/25)均为 100 终端、5 分钟、0 SQL 错误。最近对照:10/25 run 40205399128 中 1,060,131 成功、0 错误;10/23 run 39975529250 中 1,062,161 成功、0 错误。
  • 因有更早失败运行的日志已过期,只能称为近期同参数样本中首次确认,不能断言历史上绝对第一次。回归编排版本和 MO SHA 均有变化,不能仅由上述对照指定致因提交。

证据与初步分析

建议排查与验收

  1. 保留此 1M SIFT128、100 终端、5 分钟回归场景,不通过跳过错误或降低并发使其“变绿”。
  2. 在报错时间窗对齐 TP CN 的 RSS、Go heap、mpool/SQL operator 账户、缓存占用、CDC/MOTR 共置情况和查询计划;分别做独立负载与 Family 并发对照。
  3. 在最新 main 上重复运行,确认稳定复现后比较好/坏 MO 提交及编排变化。验收以 SQL 错误数=0、有效 QPS/召回、无 OOM/异常重启为准。

Activity

  1. added this to the MO-202610 milestone on Oct 27, 2026
  2. added
    kind/bug
    on Oct 27, 2026
  3. added theissue type on Oct 27, 2026
  4. aunjgr commented on Oct 27, 2026

    @aunjgr
    Contributor

    Follow-up: memory pressure, workload overlap and attribution

    The immediate failure is SQL execution-memory admission being rejected while HNSW, CDC and MOTR were active on the TP CN. The evidence points to substantial shared workload pressure and unusually high retained Go heap later in the run. It does not yet identify the owner of the memory, establish a leak or incorrect accounting, or identify a first-bad MatrixOne PR.

    What changed in the observed workload

    All times below are UTC. The vector runner and test-definition digest are identical in these two runs; the MatrixOne and MOTR revisions differ.

    Oct 25 passing HNSW run Oct 26 failing HNSW run
    MatrixOne 2f8011faecaa402801288ca4e34270d8bd404a92 6c1942f3cf0d4b967864dcc1d67b7884164a2fdb
    HNSW query window 20:38:36–20:43:42; 0 errors 20:47:16–20:52:22; 326 errors
    MOTR #27525 case 20:45:00–20:45:42, after HNSW 20:47:00–20:52:22, overlapping HNSW
    MOTR #30017 case starts 20:46:15, after HNSW 20:48:50–20:49:03, overlapping HNSW

    The #27525 case first loads 500,257 rows in 503-row INSERT batches and then checks INTERSECT DISTINCT. Its script is byte-identical across the compared MOTR revisions. Its elapsed time grew from about 42 seconds to 322 seconds; the log does not separately time the load and first query. The first HNSW failure was reported at 20:48:54, during the #30017 case, but HNSW errors continued after that case ended. Neither coincidence establishes which case caused the pressure.

    MOTR #279 moved 29 account-lifecycle cases from the parallel lane to a later exclusive phase, changing when remaining cases can run. In the failing run the #27525 case began about 140 seconds after the parallel lane started, compared with 430 seconds in the previous run. However, the Family workflow already permitted MOTR/vector overlap before #279: the relative start also depends on AP completion and scheduling. This is a plausible exposure mechanism, not proof that #279 caused the memory failure.

    Independent signs of pressure

    The CDC job repeatedly checked initial convergence against a TPCC dataset of about 3.8 million order-line rows in both runs. In the failing run its sink advanced from 1,515,520 to 1,810,432 rows between 20:48:53 and 20:52:22, roughly 1,400 rows/s. From 20:52:22 to 20:54:24 it advanced to 2,764,323, roughly 7,800 rows/s, while IVF data was being loaded. HNSW and the long MOTR case ended together, so this comparison cannot attribute the recovery to either one. CDC did not converge before its 15-minute deadline; the previous run did. Failing CDC job, passing CDC job.

    At final cleanup, several hours after the HNSW failure and after the workflow's workload jobs had ended, the failing TP CN's GC log reported 28,568 MB live heap after GC, versus 5,584 MB in the passing run. Its GC scan also reported about 77.6 million 64-byte-class objects, versus 3.4 million in the passing run. The runs had different prior workloads and outcomes; these late observations show a significant difference in retained state but do not prove what was live at 20:48 or identify its type. Failing Kubernetes evidence, passing Kubernetes evidence.

    What the errors and PR history do—and do not—show

    The 326 failures comprise 320 MergeTop capacity errors and six HashBuild memory-budget errors. One HashBuild error reports requested=16384, used=26015002320, limit=26015007832. Those fields are admission-accounting values, not a measurement of this query's resident memory or the container's RSS. The same error format can represent query-cap, aggregate-CN-cap, or physical-headroom rejection; it does not identify the branch or allocation owner.

    The admission and affected operator sources are unchanged between the last passing and failing MO revisions. #29646 introduced the live-headroom mechanism, and #27112 / #26531 introduced relevant operator accounting, but all were already in the passing build. They describe the protection path, not a demonstrated first-bad change. #30629 landed between the two builds and changed TN append/logtail handling, making it a reasonable candidate for the concurrent write/CDC slowdown; no controlled comparison establishes it as the cause.

    Next discriminating evidence

    1. Retrieve TP CN heap profiles around 20:45–20:53 UTC and at cleanup, plus the comparable passing profiles. The CN was configured with -profile-interval=30s and profile-scrape annotations. The GitHub artifacts contain only log tails, not the profiles, and the run namespace has been deleted. Compare allocation sites and retained objects before attributing the 64-byte class or declaring a leak.
    2. Under the same 55 GiB CN / 16 GiB cache / GOMEMLIMIT=25000MiB configuration, compare the good and failing MO revisions with a fixed workload schedule: HNSW alone, then with the MOTR and CDC workloads individually and together. Record execution-account usage, physical/cgroup and Go/native memory, query plans, errors, throughput and recovery after each workload ends.
    3. Keep the existing concurrent Family coverage and 100-client HNSW load. Serializing or lowering the load can be a diagnostic control, but a green isolated run does not establish that the combined-load behavior is fixed.
  5. aunjgr commented on Nov 2, 2026

    @aunjgr
    Contributor

    Investigation update: confirmed logtail regressions and proposed fixes

    An isolated parent-versus-merge comparison confirms that #30629 introduces substantial logtail CPU/work amplification. This does not yet prove that it caused the HNSW resource-admission failures tracked here. The next action is to fix the measured logtail regressions while preserving the concurrent-append correctness that #30629 introduced.

    Confirmed component results

    Compared the exact parent 28e8760905a7f39dba2ce436357ea75492f30512 with merge ccfca4f7fdc75f1c8e6cb14730f4759dc6efce66. Tracked production sources were unchanged in both diagnostic worktrees. Both used matching native inputs and the same Go 1.27.1 SIMD/v3 configuration.

    For a history of 8,192 append nodes, the append-range collection probe produced:

    Selected rows in interval Parent latency #30629 latency Median paired slowdown
    0 23.2 ns 45.2 µs 1,950×
    1 1.01 µs 86.2 µs 85.5×
    32 4.25 µs 89.6 µs 21.1×

    These are component timings, not HNSW query timings. Measurement used six balanced before/after process pairs on the same local CPU; the first result for each case in each process was excluded. CPU profiles were collected separately and excluded from latency scoring. The 95% bootstrap interval for the one-row paired slowdown was 84.21–86.07×.

    Execution counts and profiles identify the mechanism:

    • For one selected row, the parent visits one selected-node callback after indexed lookups. The merge makes three full 8,192-node passes: finding transactions to wait for, building the row selection, and building commit/abort vectors. That is 24,576 node visits.
    • An empty interval still makes two full-history passes on the merge.
    • Repeated TxnMVCCNode.PreparedIn checks account for 70.8% flat CPU in the separate merge profile.
    • One-row allocations actually decrease from six to five per call. This result establishes extra scanning, not an added per-call allocation count or a permanent leak.

    A separate probe exercises the real BoundTableOperator and TableLogtailRespBuilder with an instrumented object-data implementation. With 64 older objects whose append bounds are unknown and one in-range catalog creation, the parent makes 2 data-collection calls, while the merge makes 65. Both return the same single metadata command; both data and tombstone variants reproduce this. With known finalized bounds, the merge correctly reduces this to one call. This is caller-path evidence, not a loaded-database workload or a measurement of the original TKE object's population.

    The two critical files are byte-identical to the merge on the inspected main revision be8eb40ad8bb7b35cbd3c1f50a5a6d23e1f6da1e:

    This source comparison does not substitute for a whole-query benchmark on current main.

    Proposed PR 1: restore indexed timestamp-range collection

    Keep physical row order and prepare timestamp order as separate access paths. Concurrent Freeze means those orders can differ; copying the old single-index implementation back would risk missing or misaligning rows.

    1. Retain the physical-row index. Add an object-owned ordered timestamp index whose keys are stable after publication, with efficient insertion as well as range lookup. Avoid moving a full-history scan/copy onto every commit.
    2. Publish index membership under the existing object lock at the prepare transition and reconstruct it during replay. Track unprepared nodes separately, bounded by the retained append history. Cover both commit and rollback transitions.
    3. Preserve the preparing-window rule: a transaction can already have a prepare timestamp before AppendNode.PrepareCommit copies it. Inspect outstanding preparations as well as indexed candidates, release locks before waiting, then redo the lookup after reacquiring the lock.
    4. Sort only matching nodes into physical-row order, then construct the selection, commit timestamps and abort flags together. Their positions must remain aligned for both data and tombstones.
    5. Release index references with append history. Do not duplicate row payloads or introduce a global cache/worker.

    The intended read cost is indexed lookup plus outstanding-preparation checks, sorting of matching nodes, and emitted-row work, rather than repeated scans of all historical nodes. Memory and write-side costs are part of acceptance.

    Proposed PR 2: skip unnecessary older-object row collection

    Build on PR 1's range lookup to cheaply determine whether an older object can contribute rows before invoking expensive collection.

    • Skip only when complete history proves that the requested interval is empty. Uncertain preparations or incomplete replay history retain conservative behavior.
    • Prove the skip against the existing logtail cutoff and publication ordering: a qualifying append installed later must not be missed.
    • Preserve late appends to older objects, in-range catalog creation/deletion, and both data/tombstone handling.
    • Keep finalized-object bookmarks and release iterator locks before callbacks that may wait for transactions.
    • Reuse the object-owned index instead of adding another table-wide retained index or asynchronous worker.

    This removes unnecessary row collection. It does not promise to eliminate every cheap metadata probe when object bounds remain unknown.

    Validation and closure criteria

    • Reuse the existing empty/1/32-row diagnostic cases over increasing history sizes. Empty and small intervals must stop scaling with the full historical node count.
    • Check append/prepare/commit throughput and index memory, so improving readers does not hide a writer or retained-memory regression.
    • Add focused deterministic correctness coverage for reversed preparation order, sparse physical rows, the prepare-publication window, rollback, replay, cleanup, and late writes to older objects. Keep functional assertions outside timed benchmark loops.
    • Validate each PR separately against its clean baseline. A confirmed regression is not a passing performance result.
    • For this issue's closure, run a matched HNSW/write/CDC comparison with a fixed workload schedule and the original 55 GiB CN / 16 GiB cache / GOMEMLIMIT=25000MiB / 100-client setup. Require zero unexpected SQL errors, valid QPS/recall, no OOM/restart, and capture CPU, admission usage, Go/native/cache memory and recovery after concurrent workloads end.

    The local results justify the two logtail fixes. They do not identify the original TKE memory owner or prove the incident's introducing commit. Also, the flush path where a busy tombstone can block ready data already existed in #30629's parent; that behavior must not be misattributed to this PR. No production patch or PR has been created for this design yet.

  6. aunjgr commented on Nov 2, 2026

    @aunjgr
    Contributor

    Implementation update: one focused logtail PR

    PR #32031 — open and ready for review, using the MatrixOne template.

    The implementation addresses the confirmed append-range scanning regression. It keeps this HNSW incident open: the measurements below do not prove that the original SQL resource-admission failures are resolved.

    Credit to Ariznawlll's Oct 29 report, which had already identified the full-history scans and requested the parent/merge comparison. Our controlled measurements confirmed and quantified that concern.

    Final implementation

    • Preserve physical row order and emit row selection, commit timestamps and abort flags in matching order.
    • Build a reader-owned timestamp index for repeated large-history reads with stable history or small updates. Unfinished nodes retain the transaction-level prepare timestamp check, and waits release the MVCC lock.
    • Keep the original AppendNode layout and avoid per-node index allocation for writer-only histories. Commit/rollback record completions; readers perform index construction/refresh.
    • Use the physical scan for small histories, dense ranges and large completion batches. Drop derived state when its maintenance would cost more than scanning, and revalidate index activation after the write-unlock/read-relock boundary.
    • Preserve conservative older-object traversal and catalog changes. Object visits are not reduced to the old predecessor shortcut; empty interval collection becomes cheap inside the same collector.

    This is one PR. The earlier two-PR outline is superseded; a separate caller-side range pre-check would duplicate work.

    Local controlled results

    Separate baseline/candidate trees, normal Go 1.27.1 SIMD/v3 and matching native inputs; six balanced process pairs, first sample per case/process excluded. Initial warming is outside scored latency. Profiles and forced-GC memory measurements are separate. Scripts execute/drain without dataset, row, reference or checksum verification.

    Warm control Baseline Candidate
    8,192-node history, empty interval 45.59 µs 0.205 µs
    8,192-node history, one row 86.78 µs 1.035 µs
    8,192-node history, 32 rows 90.64 µs 6.035 µs
    Real table operator, 64 older objects × 8,192 nodes, unknown bounds 3.432 ms 0.02346 ms
    1,024 writes, collect after every write 6.691 ms 1.787 ms
    1,024 writes, collect after every 64 writes 0.6357 ms 0.5858 ms
    Concurrent control: 128 writes plus collector drain on two physical CPUs 346.4 µs 111.2 µs
    Writer p95 in that concurrent control 0.590 µs 0.560 µs
    Writer p99 in that concurrent control 87.93 µs 3.15 µs
    Collector p95 in that concurrent control 100.83 µs 59.99 µs
    Collector p99 in that concurrent control 112.75 µs 75.13 µs

    The concurrent unit's paired ratio is 0.321, 95% bootstrap interval [0.285, 0.375]. Standalone writer ratios at 64/1,024/8,192 nodes are 1.007/1.017/1.013, with intervals [0.987,1.026]/[0.995,1.027]/[0.989,1.040]: those small differences remain inconclusive. No confirmed regression remains in the scored warm read/writer/caller controls; this is not proof of universal zero regression.

    The table-operator fixture executes the real response builder and MVCC collector through a payload-free object-data seam. It measures no-change older-object work, not a loaded database. The concurrent control overlaps actual MVCC writes and collection, not SQL clients or the full Family schedule.

    Cost and profiling

    Indexed live Go state rises from 168.1 to 227.4 B/node in the 8,192-node storage fixture: approximately 59.3 B/node / 0.46 MiB per object additional metadata. Its references/capacity are included in the existing memory estimate and released on deactivation/history release. Row payloads are not copied into the index. Initial construction is synchronous reader-owned work under the object write lock and is excluded from the warm-latency table.

    Separate CPU captures attribute 76.8% of baseline one-row collection CPU to repeated PreparedIn checks. The candidate removes that full-history work; remaining CPU is in indexed lookup, vector allocation/output and runtime bookkeeping. The committed benchmarks allow others to reproduce the measurements.

    Validation and remaining incident work

    Normal owning-package tests, owning race checks, 100-run exact-cutoff reader stress, 100-run prepare-window stress, the concurrent benchmark's race check, and existing replay/flush/GC engine consumers pass. Focused index-module statement coverage was about 92% before the final lint-only cleanup and additional queued-removal assertions. The full repository standard pre-push static gate passed at e1568b6bc0. Mergify then merged newer main commits; all seven PR files remain byte-identical. Latest-head CI is running; it is not counted as a pass.

    For #31374 closure, still compare the original 55 GiB CN / 16 GiB cache / GOMEMLIMIT=25000MiB / 100-client HNSW load under a fixed CDC/MOTR schedule. Require zero unexpected SQL errors, valid QPS/recall and no OOM/restart, with admission, Go/native/cache memory and post-workload recovery captured. No first-bad attribution for the original HNSW incident is claimed from these component results alone.

  7. XuPeng-SH commented on Nov 2, 2026

    @XuPeng-SH
    Contributor

    合并进展与范围确认

    PR #32031 已于 2026-11-02 13:09:05 UTC 合入 main,merge SHA 为 035356d963f6dd124a61d66d0018aa0b8da3247f。此前“open / CI running”的进展已更新:本轮远端核对最终 PR head bb899f79f50e678930a07dbd0f0da9f0325b6560 的 CI Required、UT、SCA、共享构建及已启用 COMPOSE / PROXY BVT 均为 success;跳过的升级等检查不计作通过。

    本次只覆盖已量化的 append-range 扫描退化,不代表本 issue 的 HNSW / CDC / MOTR 联合负载资源准入事故已修复。保留 aunjgr 和 open 状态,不将此总项改派 QA;之前两 PR 方案已被单个 #32031 实现替代,不把旧方案当作未完成开发项。剩余事故范围及原配置联合负载验证要求以此前实现更新为准。

    以上是远端状态、PR 范围与作者/评审证据核对,本轮未运行本地产品测试,也不声明验收通过。

  8. aunjgr commented on Nov 3, 2026

    @aunjgr
    Contributor

    Post-merge HNSW evidence and exact remaining acceptance

    The confirmed append-range scanning fix is complete: #32031 merged as 035356d963f6dd124a61d66d0018aa0b8da3247f. No second caller-side optimization PR remains from the superseded two-PR outline.

    I audited the Nov 2 full Family run, including its image receipt, HNSW report, CDC timeline, routing/resource manifest and pod health records. This provides new post-merge workload evidence, without launching another benchmark.

    Evidence Observed result
    Actual tested MO SHA 035356d963f6dd124a61d66d0018aa0b8da3247f, exactly the #32031 merge
    CN topology/resources 1 TP + 2 AP; each 14 CPU, 55 GiB memory, 16 GiB cache, GOMEMLIMIT=25000MiB, GOGC=200
    TN resources 14 CPU, 32 GiB memory, 5 GiB cache, GOMEMLIMIT=20000MiB, GOGC=200
    HNSW workload SIFT128, original M8 / construction EF200 / search EF64, 100 clients
    Query window 2026-11-02 20:16:15–20:21:14 UTC
    HNSW outcome 1,271,566 successes, 0 errors, reported QPS 4,130; recall 92.06%; RT50 20.29 ms / RT99 80.31 ms
    Actual CDC overlap Initial TPCC replication was active throughout the HNSW query window; order-line sink increased from 1,655,089 at 20:16:02 to 2,807,871 at 20:21:04, with 3,805,883 source rows
    CDC completion Typed DML and TPCC chains converged; initial/final task-runner evidence classified them as TP-only
    Resource-health gate All 9 expected pods retained their identities, with zero recorded restarts and no recorded OOM termination

    The HNSW job and CDC job succeeded. The overall Family run failed other gates; this is not an overall CI pass. The vector comparison explicitly says BASELINE_BUILDING and performance_verified=false. Its report does not establish exclusion of a cold run, so the QPS above is a recorded workload result, not an accepted warm performance comparison or a claimed HNSW speedup.

    This is encouraging recovery evidence, but it does not meet the previously agreed incident closure criteria. MOTR now ran at 22:41–23:29 UTC, after HNSW, and its pinned revision/schedule changed. There is no matched baseline/candidate pair or query-window memory/profile evidence here. Therefore neither attribution of the original admission errors to #30629 nor their resolution specifically by #32031 is established.

    Remaining work

    1. Run the already prepared same-base baseline/candidate images against the fixed HNSW + write + CDC schedule, with the original resource budgets. Exclude the first/cold run; collect profiles in separate runs. Require zero unexpected SQL errors, valid workload/recall, no restart/OOM, and admission/Go/native/cache memory plus recovery evidence. If neither arm reproduces the admission failure, report that limitation rather than claiming causal proof.
    2. Publish those results and profiles, then close this incident only if the acceptance evidence supports closure; otherwise use the residual profiles to identify the next concrete fix.

    Both frozen images and the original-client/CDC preparation succeeded. The diagnostic workflow is prepared; no paired TKE workload has run.

    The current blocker is a usable existing Family connection, not permission to use it. The authorized checked-in kubeconfig/tke-config identifies cls-9nd9no1l; the actual Family target is cls-rzk3m6se. Standard diagnostic runners have no default kubeconfig, and mo-auto-test has no TKE_KUBECONFIG_B64 input configured. My current GitHub account has read-only access to mo-nightly-regression, so it cannot dispatch that repository's credential-bearing workflow. Supplying the correct existing connection through TKE_KUBECONFIG_B64 in mo-auto-test, or its existing configuration location, unblocks the prepared validation. Credential values should not be posted to this issue.

    The issue remains open for this explicit acceptance gap; the component implementation is finished.

  9. aunjgr commented on Nov 3, 2026

    @aunjgr
    Contributor

    Recent-nightly comparison: symptom recovered; fixing change unconfirmed

    The four most recent completed HNSW jobs all report zero SQL errors. Recovery was already visible before #32031 merged. The latest result therefore does not establish that #32031 fixed the original admission incident.

    Dates below use the actual query window in UTC, not issue creation time or campaign dispatch time. QPS and latency are the reports' own values; these are observational Family results, not a controlled warm benchmark.

    HNSW query date UTC / campaign Tested MO SHA SQL errors Reported QPS RT99 ms Recall
    Oct 26, original incident 6c1942f3cf 326 invalid (-1) 318.62 91.71%
    Oct 28 8f9bcd29ed 0 4,029 78.51 92.25%
    Oct 29, last confirmed recurrence ee8b20692e 715 invalid (-1) 260.72 91.81%
    Oct 31 06:46, Oct 30 campaign attempt 2 c8534cc3e2 0 1,730 238.46 92.15%
    Oct 31 20:10 1565fb79ab 0 4,125 79.08 92.32%
    Nov 1 20:15 c5c163cd23 0 2,644 113.96 92.17%
    Nov 2 20:16, exact #32031 merge 035356d963 0 4,130 80.31 92.06%

    All four recent reports retain 100 terminals and approximately five minutes of queries. Their resource evidence retains 1 TP + 2 AP, CN 55 GiB / cache 16 GiB / GOMEMLIMIT=25000MiB, and the resource-health records show no CN restarts or OOM termination.

    Important exposure differences:

    • The Oct 31 morning retry had CDC and MOTR jobs overlapping HNSW. Job-level overlap does not establish identical write rates or case-level memory pressure.
    • The Nov 1 overall campaign was cancelled, but its HNSW job completed successfully. Its CDC lane was skipped, so this is a valid HNSW result with reduced cohost exposure, not a complete combined-load acceptance pass.
    • The Nov 2 HNSW window overlapped actual TPCC CDC replication. MOTR was scheduled later; the prior comment records the exact timeline and original resource settings.
    • The Oct 31 morning result has substantially lower QPS and higher tail latency than the evening result despite zero SQL errors. A healthy workload outcome is not proof that all performance regressions are resolved.

    The latest QPS is only about 0.12% above Oct 31 evening (4,130 vs 4,125); RT99 is 80.31 vs 79.08 ms. There is no meaningful observational HNSW speedup to attribute to #32031 here. The confirmed local append-range improvement and HNSW incident attribution remain separate claims.

    Conclusion: the reported admission failures are no longer reproducing in the four most recent completed nightly HNSW jobs. That is stronger recovery evidence than the single Nov 2 run previously summarized. It is still insufficient to identify the fixing change or prove the original pressure condition eliminated: an earlier Oct 28 pass was followed by the Oct 29 recurrence, and cohost schedules differ. #31723 is present in the inspected Oct 31 passing SHAs and absent from the Oct 29 failing SHA; this is a temporal candidate, not causal proof.

    No additional product-code change is justified by these reports alone. The issue remains open for the previously described incident acceptance/attribution gap; this comparison launches no benchmark or CI rerun.

  10. added
    severity/s0
    and removed on Nov 3, 2026
  11. assigned and unassigned on Nov 3, 2026
  12. aunjgr commented on Nov 3, 2026

    @aunjgr
    Contributor

    Downgraded from severity/s-1 to severity/s0 and reassigned to the original reporter, Ariznawlll, for verification, as requested.

    The four most recent completed HNSW nightly jobs report zero SQL errors at the original 100-client concurrency and memory budgets. The last confirmed recurrence was Oct 29. Recovery predates #32031, and concurrent-workload exposure varies, so this is not a confirmed attribution of the incident fix. The issue remains open for reporter verification.

    Recent-nightly comparison and evidence.

  13. Ariznawlll commented on Nov 3, 2026

    @Ariznawlll
    CollaboratorAuthor

    结论

    补充回归核查:目前相关 HNSW 用例已连续恢复,最近四次已完成的 nightly HNSW 测试均未再出现本 issue 的 SQL 内存准入错误。但原 HNSW / CDC / MOTR 联合压力条件下的修复验收尚未完成,本次不据此关闭 issue,也不把缺少该项验证描述成当前测试失败。

    关键证据

    • 本次直接核对了 run 41468243322 的 TP Tail 原始日志,其中 Vector / HNSW SIFT128 / L2 步骤成功。实际 MO 为 main@035356d963f6dd124a61d66d0018aa0b8da3247f,即 perf(tae): index logtail append ranges on demand #32031 的合并提交。
    • 原始 HNSW summary:查询窗口为 2026-11-02 20:16:15–20:21:14 UTC(北京时间 11 月 3 日 04:16:15–04:21:14),TERMINALS=100、SUCCESS=1271566、ERROR=0、RESULT=SUCCEED;报告 QPS 4130、召回率 92.06%、RT99 80.31 ms。该结果是实际用例完成,不是因整轮状态或跳过步骤推断通过;QPS 不作为受控性能提升结论。
    • 根据研发已补充的近期回归对照,最近四个已完成 HNSW job 均为 0 SQL 错误,最后确认复现是 10 月 29 日(UTC)。其中 11 月 1 日整轮取消,但 HNSW job 已完成;不能将其算作整轮联合负载通过。
    • perf(tae): index logtail append ranges on demand #32031 已修复确认存在的 append-range 扫描退化;HNSW 的恢复在它合入前已经出现,所以不能将本事故的消失直接归因于该 PR。
    • 按研发合入后证据核对,最新一轮仍为 1 TP + 2 AP、CN 55 GiB / cache 16 GiB / GOMEMLIMIT=25000MiB,HNSW 查询期间有实际 TPCC CDC 复制,资源检查未记录重启/OOM;但 MOTR 在 HNSW 结束后才执行,未覆盖原来三者同时运行的压力组合。

    待解决点

    需要在原资源预算及固定的 HNSW + 写入 + CDC/MOTR 并发时序下补齐验证,确认 SQL 错误为 0、召回有效、无 OOM/异常重启,并保留查询窗口的内存准入、Go/native/cache 占用及负载结束后的恢复证据。当前已有的连续恢复结果应保留,但不替代这项尚未完成的验收。

    本次仅核查现有日志和研发记录,未触发新测试,未修改 issue 状态。

  14. Ariznawlll commented on Nov 4, 2026

    @Ariznawlll
    CollaboratorAuthor

    结论

    测试通过。本次结论限定为当前 main nightly 中本 issue 对应的 HNSW SIFT128 查询场景:近期连续完成的相关测试未再出现 MergeTop / HashBuild 内存准入错误。按报告人本次要求,以当前 main 回归持续未复现作为关闭依据,关闭本 issue;不将关闭解释为某个 PR 的因果验证,也不代表整轮回归全部通过。

    关键证据

    • 最新回归:run 41660201691 / TP Tail job 126188084128。实际 MO 为 main@54a6b173282c1df71fcbf54fff42869a27cf4fc5,已核对镜像构建凭据,不是将测试仓库 SHA 当作 MO SHA。
    • 原场景完整执行:SIFT128 100 万向量;HNSW M=8 / EF_CONSTRUCTION=200 / EF_SEARCH=64 / vector_l2_ops;100 终端、5 分钟。北京时间 2026-11-04 04:43:27–04:48:26,成功 1,136,558 次,ERROR=0、RESULT=SUCCEED,召回率 92.11%,RT50 22.87 ms、RT99 84.31 ms;原始错误文件为 0 字节。原始日志与报告
    • 统计口径说明:mo-load 原始 QPS 字段为 -1,Family 报告保留原值,并用成功数 / 起止时间差得到有效 QPS 3801.20(1,136,558 / 299 秒)。SQL 成功数、错误数、召回率及运行窗口均有原始证据;这里不把该派生 QPS 当作受控性能改善结论。
    • 资源未通过降低并发或扩大 CN 预算来绕过:1 TP + 2 AP,每个 CN 为 14 CPU / 55 GiB、cache 16 GiB、GOMEMLIMIT=25000MiB、GOGC=200;资源健康记录显示 9 个预期 Pod 身份一致,全部 restart=0,无记录到的 OOM termination。
    • 本轮确有 HNSW 与写入/CDC 重叠,不只是 job 名称重叠:CDC 证据中 TPCC 写入于 UTC 20:44:55–20:47:56 执行,落在 HNSW 查询窗口内,完成 15,991 个事务、事务错误 0;typed DML 和 TPCC 源/目标最终均收敛。

    本次还重新下载核对了下列四轮的镜像凭据和 HNSW 原始报告,均为 100 终端、约 5 分钟,未跳过相关用例:

    实际查询日期(北京时间) 回归 MO SHA(短) 成功查询数 SQL 错误 召回率
    11-01 41212845315 1565fb79ab 1,305,505 0 92.32%
    11-02 41319347616 c5c163cd23 1,242,961 0 92.17%
    11-03 41468243322 035356d963 1,271,566 0 92.06%
    11-04 41660201691 54a6b17328 1,136,558 0 92.11%

    其中 41319347616 整轮后来取消,但 HNSW 已完成,不将它算成整轮通过。结合研发此前已核实的 41077521007 attempt 2,最近五个已完成 HNSW 样本均为 0 SQL 错误;最后确认复现仍是 UTC 10 月 29 日的 40898244248。

    待解决点

    • 当前 main nightly 原 HNSW 用例未发现本 issue 报错,按上述连续恢复证据关闭。若后续相同错误重现,附具体 run、MO SHA、SQL 错误和并发负载窗口重新打开。
    • 根因归属及原固定 HNSW + CDC/MOTR 联合压力条件的受控验收仍未完成:最新一轮 MOTR 于 UTC 23:02 后执行,未与 HNSW 重叠;本次没有补做配对测试或查询窗口内存剖面。因此不声称 perf(tae): index logtail append ranges on demand #32031 或其他单一 PR 已根治全部组合,也不撤回此前关于该证据边界的记录。本次关闭是报告人采用当前 nightly 连续未复现的跟踪口径,不是这些额外验证已完成。
    • 本次只核查现有回归证据,未触发新回归。整轮其他失败与此 HNSW SQL 错误的关闭结论分别跟踪。
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