Skip to content

[Bug]: IVFFlat SIFT128 queries close RPC streams on main #28378

Closed

Description

@Ariznawlll

Description

On main, the distributed IVFFlat SIFT128 benchmark accepts the 1M-row dataset and completes index creation, but the subsequent indexed ANN queries return ERROR 20503 (HY000): rpc stream closed under 100-terminal load. All three IVFFlat variants in the same job fail; the HNSW control on the same SIFT128 data succeeds.

This blocks collection of valid IVFFlat recall/QPS evidence. It is a server-side query/connection interruption rather than an index-build, dataset-download, or benchmark assertion failure.

Severity rationale

The failure affects the primary IVFFlat query path on main for L2, cosine, and normalized-L2 workloads. It happens immediately after a successfully built index and turns thousands of ordinary SELECT ... ORDER BY <vector-distance> ... LIMIT 10 requests into connection errors. Marked severity/s-1 for prompt triage; the current evidence is one failed nightly run, not a 3/3 stability claim.

Environment

  • Branch: main
  • MatrixOne commit: 39225f5fbc63b44a190cdd43f954ee07d78e6cdc
  • Deployment: TKE distributed MatrixOne, 3 CN + 1 TN
  • CN/DN limits: 55 GiB; GOMEMLIMIT CN 25000 MiB and DN 35000 MiB
  • Dataset: SIFT128, 1,000,000 vectors, VECF32(128); query and ground-truth files are the matching SIFT set
  • Workload: 100 terminals, 5-minute measured window, k=10, probe_limit=5
  • IVFFlat index: lists=500, experimental_ivf_index=1

Steps to reproduce

  1. Create ann.items_sift (id INT PRIMARY KEY, embedding VECF32(128)).

  2. Load the 1M SIFT128 base vectors and set probe_limit = 5.

  3. Create the L2 IVFFlat index:

    CREATE INDEX ivf_500 USING ivfflat ON ann.items_sift (embedding)
    OP_TYPE 'vector_l2_ops' LISTS=500;
  4. Run concurrent indexed queries for five minutes with 100 terminals, for example:

    SELECT id
    FROM ann.items_sift
    ORDER BY l2_distance(embedding, '<SIFT128 query vector>')
    LIMIT 10;
  5. Repeat with cosine and normalized-L2 IVFFlat variants using the same SIFT128 data and concurrency.

The nightly reproducer performs these operations through mo-load case cases/ann/ivf/sift/.

Actual behavior

The base-data load and every IVFFlat index creation completed successfully. The first L2 query failure appeared about two seconds after index creation:

03:05:14  CREATE INDEX ivf_500 ... completed successfully
03:05:16  ErrorCode : 20503
03:05:16  ErrorMessage : rpc stream closed

The final result records are:

Case Duration Successful queries Errors Recall@10 QPS Result
IVFFlat L2 302 s 795,462 2,205 76.99% 2,615 FAILED
IVFFlat cosine 301 s 720,804 1,546 78.25% 2,468 FAILED
IVFFlat normalized-L2 301 s 653,775 625 80.22% 2,321 FAILED

The failing SQL is an ordinary indexed vector SELECT ... ORDER BY <distance>(embedding, vector) LIMIT 10; the client receives 20503 rpc stream closed, not a recall-threshold error. CN diagnostics in the same time window record remote-execution query interrupted / context canceled signals. The collected pod status showed all CN pods with zero restarts; no panic or OOM signal was retained for this failure.

Expected behavior

After a successful IVFFlat index build, all supported L2, cosine, and normalized-L2 indexed queries should complete without connection closure. The five-minute workload must report zero query errors and produce usable recall/QPS evidence.

Stability and controls

  • Reproducer: one nightly run; all three IVFFlat variants in that run failed with the same rpc stream closed client symptom. A separate 3/3 repeat is still required to establish failure frequency.
  • Passing control: in the same deployment, with the same 1M SIFT128 VECF32(128) data, 100 terminals, and five-minute window, HNSW L2 completed successfully: 5,059,018 successful queries, 0 errors, 92.28% recall, and 16,998 QPS.
  • Exclusions: data load, table creation, and IVFFlat index creation succeeded. Therefore this is not explained by COS dataset availability or a failed index build. The benchmark records nonzero query errors as FAILED; it does not convert them into a performance result.

Evidence

Code analysis

Root cause is not yet confirmed. The server-side evidence points to a distributed remote-execution cancellation/stream-lifecycle path, because the client-side rpc stream closed coincides with CN query interrupted and context canceled messages. It is not sufficient to attribute the failure to a specific CN/TN/RPC component without a controlled rerun retaining CN/TN/Proxy diagnostics.

Regression coverage

The existing mo-load SIFT128 IVFFlat benchmark is the appropriate regression workload. After a product fix, run each L2/cosine/normalized-L2 case independently at least three times with the same 1M data, 100-terminal concurrency, and five-minute window. Require zero client 20503/rpc stream closed errors, zero server-side query interrupted caused by the request path, and a passing HNSW control.

Related

Activity

  1. added this to the MO-202609 milestone on Sep 8, 2026
  2. added theissue type on Sep 8, 2026
  3. XuPeng-SH commented on Sep 8, 2026

    @XuPeng-SH
    Contributor

    @VioletQwQ-0 please take a look at it ASAP

  4. VioletQwQ-0 commented on Sep 11, 2026

    @VioletQwQ-0
    Collaborator

    转 QA:已合入修复的部署验收与回归覆盖

    @Ariznawlll 请接收 #28378 的开发侧验证结果。issue 保持 OPEN;本次交接不是正式 QA PASS,也不宣称唯一根因已确认。

    生产核验版本:2a6fe7f61358e846a20aafba3b50903a61608682,包含 #28358 的完整 MORPC 序号/写失败修复(040356c3)、#28364 中 dispatch/remote pipeline/ReceiverStopped 相关修复(67677d98,该提交还含无关改动),以及 #28539 的 shuffle 退休与 terminal 所有权修复(fb214b2d3c5624eeeb161d69123eea15d3110854)。没有新增生产补丁。

    回归覆盖单独提交为 #28672,commit 231239efba5eca40bde92ed3932d44aa4ffc3bba,目前为 Draft,PR CI/审阅另行验收,不能将下面的产品部署结果当成新测试提交的 CI PASS。

    已有证据

    用例 旧失败版本错误数 修复版本成功数 修复版本错误数 修复版本报告 TPS
    HNSW 0 5,281,324 0 17,872
    IVF L2 1,702 846,486 0 2,780
    IVF cosine 1,266 733,160 0 2,439
    IVF normalize 588 661,908 0 2,217
    • 旧症状样本:run 34352473993,产品 39225f5fbc63b44a190cdd43f954ee07d78e6cdc,三个 IVF 在实际测量窗口出现 20503 / rpc stream closed。
    • 修复版本:run 34464342049,artifact issue-28378-tke-baseline-34464342049-1(ID 10148674610)。百万条 128 维基础数据、10,000 查询、100 终端,每例完整测量约五分钟;五份数据 SHA-256 与旧样本一致,九个服务 Pod 的资源请求/限制及 nodeSelector 一致。workflow 9538c3b07ce340a2abef90ef35ac0aca08418062,mo-load 97464107cfb7367ffd969d88addcdc0eb6a14b5a。
    • 实际镜像 digest:sha256:f5ba6ac3505607ffaa3c961a2bcf60a2157d3833c24264d99f7fc17d3a90f341。四份 summary/result 和空错误文件交叉核验通过;该模式的 workflow 绿色本身不能替代结果检查。与旧样本 TPS 差异约 -0.93%/-2.42%/-0.61%/-0.81%,未见明显降载换取零错误,但不是统计性能结论。
    • 归档时九个 Pod Running、重启数零;清理 job 成功,随后只读确认 namespace 已不存在。未独立证明底层云盘或对象前缀物理回收。
    • 本地 macOS arm64 / Go 1.26.4:新增机制普通 100 次、race 20 次,相关包普通/race,双 CN IVF/control 普通/race 均通过;正式 BVT 两个入口分别 36/36,完整元数据比较。六文件摘要与实际提交一致。序号测试在 fix(morpc): avoid client stream sequence gaps #28358 父版编译成功并因 expected 2 / actual 3 失败,证明该代码机制;其他集成测试不冒充原事故反例。

    QA 验收要求及边界

    1. 确认目标发布版本包含上述已合入生产修复,复核固定版本、数据和负载证据;这次交接不要求机械追加同条件大型 TKE 重跑。
    2. 验收 SQL/传输错误为零、四例完成原测量和有效并发、无影响有效性的服务重启/资源故障;仅 workflow 绿色不足以验收。
    3. 新增测试 PR 的 Linux CI/审阅仍独立待完成。本地证据不是 Linux/amd64 Go 1.26.6 的证明。
    4. 原始和修复轮服务日志主要仅保留末段,缺少首错完整 query/stream/peer/close-cause 关联;没有 S/D/H 单因素对照,不能认定唯一根因。artifact 隐藏 .run 未上传、摘要清单自身摘要不自洽;46 个可见业务文件摘要通过,结果/数据文件没有发现不符。
    5. 请在本 issue 记录 QA 的明确版本、环境和 PASS/FAIL。若失败,保留首错时间、查询/peer 信息及日志,再回到开发定位;正式 QA 接受前不关闭 issue。
  5. VioletQwQ-0 commented on Sep 11, 2026

    @VioletQwQ-0
    Collaborator

    调整转测时机:等待回归覆盖 PR #28672 合入后,再正式转 QA。上一条评论中的验证数据和结论边界继续有效,但本次 QA 交接暂缓,目前不需要 QA 开始验收。

    本 issue 保持 OPEN,移除 phase/testing,责任人恢复为 VioletQwQ-0。后续转测应重新核对 PR 合入状态及对应 CI 结果,再提交正式交接。

  6. VioletQwQ-0 commented on Sep 14, 2026

    @VioletQwQ-0
    Collaborator

    @Ariznawlll 恢复正式 QA 交接:回归覆盖 PR #28672 已于 2026-09-14 04:53:57 UTC 合入,已核实 squash 提交 c148f0e2a77afb6d8feac721028492b77e0eba97,最终 PR head 为 5ce02a0b503c52799d4733931c849a7ba642449d。issue 保持 OPEN,并恢复 phase/testing。

    CI 证据边界:此前 head 323daee056991164e5f807ac070295baf633b460 的 CI Required 已通过(run 34799486791);最终 head 的 run 34807660456 尚在运行,不能将此前结果视为最终 head CI PASS。合并由仓库侧完成,本监控没有绕过保护或触发 CI/TKE。

    请沿用本 issue 2026-09-11 的部署证据和验收要求:核对目标版本包含 #28358、#28364 相关修复和 #28539,复核 run 34464342049 原规模 SIFT128 四例零客户端错误、结果有效性及清理情况,并记录明确版本、环境和 QA PASS/FAIL。最终 head CI 仍是待核验项;原现场唯一根因未闭环,正式 QA 接受前不关闭 issue。

  7. Ariznawlll commented on Sep 14, 2026

    @Ariznawlll
    CollaboratorAuthor

    测试版本

    • 问题首次出现版本:39225f5fbc63b44a190cdd43f954ee07d78e6cdc(main)。
    • 已部署修复验证版本:2a6fe7f61358e846a20aafba3b50903a61608682(main)。该版本包含 fix(morpc): avoid client stream sequence gaps #28358 的 MORPC 写失败/序号修复 040356c3、fix(sql): support bounded deep existential predicates #28364 的 dispatch/remote pipeline/ReceiverStopped 相关修复 67677d98,以及 fix(dispatch): preserve terminal errors on receiver retirement #28539 的 shuffle 退休与 terminal 所有权修复 fb214b2d3c5624eeeb161d69123eea15d3110854。
    • 后续回归实际验证的 MO 版本:a68a200c0bfb0c18f1b7f49d26b20b8d0d9b017f(main)。已核对该 commit 包含上述三项修复。
    • 当前 official main:6987fda6c4a13295b8d525706342fc6033094d2e,是 a68a200c0bfb0c18f1b7f49d26b20b8d0d9b017f 的后继版本(向前 18 个 commit)。
    • 环境:TKE,3 CN + 1 TN;SIFT128,100 万条 VECF32(128);100 terminals、5 分钟;k=10、lists=500、probe_limit=5。

    原问题验证

    原始回归在上述规模下,IVFFlat L2、cosine 与 normalize 三个查询场景出现 ERROR 20503 / rpc stream closed,共 4,376 次客户端错误;同轮 HNSW 对照没有该错误。原始证据:run 34136649854 / job 101921662405。

    因此,本次核对关注的是:在不降低数据规模、并发、运行时长或 IVFFlat 参数的前提下,三类 IVFFlat 查询是否仍会中断 RPC stream。

    业务场景验证

    在修复部署版本 2a6fe7f61358e846a20aafba3b50903a61608682 的原规模验证中,四个场景均完成且客户端错误为 0:

    场景 成功请求数 客户端错误数 TPS
    HNSW 5,281,324 0 17,872
    IVFFlat L2 846,486 0 2,780
    IVFFlat cosine 733,160 0 2,439
    IVFFlat normalize 661,908 0 2,217

    修复前后性能量级保持接近,IVFFlat 三项 TPS 差异约为 -2.42%、-0.61%、-0.81%;因此错误归零不是通过降低压力或缩短测试换来的。部署验证证据:run 34464342049。

    后续 main nightly 再次以相同数据集和四个场景验证 a68a200c0bfb0c18f1b7f49d26b20b8d0d9b017f:

    场景 成功请求数 客户端错误数 QPS Recall
    HNSW 4,987,236 0 16,786 92.23
    IVFFlat L2 807,304 0 2,793 77.61
    IVFFlat cosine 743,032 0 2,493 77.93
    IVFFlat normalize 651,289 0 2,433 81.09

    该 Job 完整日志中 ErrorCode : 20503、rpc stream closed、query interrupted、context canceled 的出现次数均为 0;四个场景结果均为 SUCCEED。run 34764591964 / job 103838331932。

    稳定性与边界核对

    • HNSW 同时作为向量查询对照场景执行,未观察到连接中断。
    • IVFFlat 的 L2、cosine、normalize 三种距离/归一化路径均已覆盖,均未出现原始 RPC stream 关闭签名。
    • 本次为黑盒 TKE 回归核对;未引入故障注入,也没有获得原始现场首个服务端错误前的完整 MORPC 链路日志。因此,现有证据证明用户可见故障已不再复现,但不能单独据此确认原现场的唯一内部根因。
    • 回归 PR test: cover IVF remote stream lifecycle regressions #28672 的最终 TKE BVT 子任务独立执行中,不影响本次同规模产品回归的判定。

    回归测试

    回归覆盖已由 #28672 合入 main,squash commit 为 c148f0e2a77afb6d8feac721028492b77e0eba97,最终 PR head 为 5ce02a0b503c52799d4733931c849a7ba642449d。该覆盖用于持续检出 IVFFlat 并发查询中的 RPC stream 中断;产品修复验证与回归覆盖 CI 证据在上文分别列出,未混为同一结论。

    测试证据

    测试结论

    测试通过。

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

Metadata

Metadata

Assignees

Labels

kind/bugseverity/s-1

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions