Repository navigation
Description
Description
Main TKE nightly 的 ANLI mixed(pre) 混合查询在首次访问 FULLTEXT 复制表时出现超过 100 秒的长尾,客户端触发读超时并断开。相同运行中的单项 qvec、qft、nqft 均成功,混合阶段最终因两条 nqft 查询失败退出。
Environment
- Branch:
main - MatrixOne commit:
a68a200c0bfb0c18f1b7f49d26b20b8d0d9b017f - Namespace:
mo-main-commit-a68a200c0b-20260913 - Deployment: TKE,3 CN + 1 DN + 3 LogService + 2 Proxy
- CN resources: 14 CPU / 55 GiB memory limit
- Test time: 2026-09-14 00:23:04–00:33:08 UTC
Steps to reproduce
- 准备
ca_comprehensive_dataset及三张复制表,并为各表创建 IVF 与 FULLTEXT 索引。 - 使用 nightly 当前参数先执行单项查询,再执行 pre-filter 混合查询:
ANLI_QUERY_DURATION=300 \
ANLI_MIX_DURATION=600 \
ANLI_QUERY_CONCURRENCY=10 \
ANLI_TYPE_CONCURRENCY=5 \
./run_all_anli_tests.sh <proxy-host> report_pre pre- 混合阶段同时运行 5 个
qvec和 5 个nqftworker,并轮询以下 4 张表:
ca_comprehensive_dataset
ca_comprehensive_dataset_copy
ca_comprehensive_dataset_copy01
ca_comprehensive_dataset_copy02
Actual behavior
混合阶段于 00:23:04 UTC 启动。两条首批 nqft 候选查询在约 100 秒后同时超时:
OperationalError: (2013, 'Lost connection to MySQL server during query (timed out)')
对应表和查询词为:
-- ca_comprehensive_dataset_copy01
SELECT md5_id,
MATCH (question) AGAINST ('红包 在' IN BOOLEAN MODE) AS vec_dist
FROM ca_comprehensive_dataset_copy01
WHERE MATCH (question) AGAINST ('红包 在' IN BOOLEAN MODE)
AND delete_flag IS NULL
ORDER BY vec_dist DESC
LIMIT 200;
-- ca_comprehensive_dataset_copy
SELECT md5_id,
MATCH (question) AGAINST ('年度 有' IN BOOLEAN MODE) AS vec_dist
FROM ca_comprehensive_dataset_copy
WHERE MATCH (question) AGAINST ('年度 有' IN BOOLEAN MODE)
AND delete_flag IS NULL
ORDER BY vec_dist DESC
LIMIT 200;服务端 nightly-regression-dis-tp-cn-7k9h2 分别在约 100.07s 和 100.11s 后记录 context canceled。其中一条同时停在 FULLTEXT 隐藏索引的 __DocLen 查询:
SELECT COUNT(*)
FROM anli_test.__mo_index_secondary_...
WHERE word = '__DocLen'
同一阶段 qvec 的最大延迟达到 98.14s。客户端重建连接后测试继续运行,之后没有新增失败,但累计失败数保持为 2:
nqft: total=2469, success=2467, failure=2, cumulative_failure=2
Valid results: 3/4
Expected behavior
在没有 OOM、Pod 重启或资源打满的情况下,首次访问已建好的 FULLTEXT/IVF 索引不应阻塞超过 100 秒并导致客户端连接超时。混合查询应完成且查询失败数保持为 0。
Stability and controls
- Reproducer: 当前 main nightly 观察到 1 次;属于间歇性问题,最近检查的 3 次相同步骤均成功。
- Same-run controls: 单项
qvec95,338/95,338、qft1,323/1,323、nqft3,283/3,283,均无失败。 - Previous-run controls:
- Run
34701219177/ Job103637982220: success - Run
34614210743/ Job103455378390: success - Run
34493586679/ Job103091246781: success
- Run
- Pod restart count: all 0 during the event window.
- OOM events: all 0 during the event window.
- Affected CN memory: approximately 27–31 GiB / 55 GiB limit.
- Affected CN CPU peak: approximately 4.27 / 14 cores.
- Read-only workload; no data modification or corruption was observed.
Evidence
- Failed run: https://github.com/matrixorigin/mo-nightly-regression/actions/runs/34764591964
- Failed job: https://github.com/matrixorigin/mo-nightly-regression/actions/runs/34764591964/job/103812455899
- MatrixOne commit: a68a200
- Error window:
2026-09-14 00:23:05–00:24:46 UTC - Affected CN:
nightly-regression-dis-tp-cn-7k9h2
Code analysis
The test uses PyMySQL read_timeout=100s. The two backend statements started with the mixed workload and were canceled only after the client hit that exact timeout; the validator correctly reported the real query failures.
The standalone tests warm only the default table, while the mixed stage immediately distributes work across all four tables. The failed statements were the first accesses to two copied tables. Loki also shows slow FileService reads during the startup window. This is correlated with cold index/cache loading, but the exact MatrixOne blocking path still needs confirmation from FULLTEXT/FileService profiles.
The failure is not explained by OOM, process restart, CPU saturation, memory exhaustion, fixture generation, JSON extraction, or expected-result comparison.
Regression coverage
After the product behavior is understood or fixed, add a focused distributed regression that:
- creates multiple tables with equivalent FULLTEXT/IVF indexes;
- begins mixed
qvec+nqftqueries without pre-warming the copied tables; - records first-query latency separately from steady-state latency;
- asserts no connection loss, timeout, panic, OOM, or restart.
Related
- [Bug]: [stability test] mixed fulltext-vector test 'Lost connection to MySQL server during query (timed out)')' #23123 reported the same client error in an older mixed fulltext-vector stability workload, but was closed as a script issue without a MatrixOne fix. The current run has server-side statements lasting until the 100-second client timeout, so it should not be treated as a confirmed duplicate.
- [Bug]: IVF Wiki 10M has sustained object-column read/decompression amplification under bounded cache #28627 tracks sustained IVF ObjectIO/FileService read/decompression amplification on a different Wiki 10M workload; it does not cover these
nqftFULLTEXT candidate queries. - [Bug]: [4.2-dev Stability] Sysbench, TPCC and Fulltext lose connections for 3 minutes without pod restart or OOM #27318 tracks a different 24-hour stale socket-deadline failure that caused abrupt cross-workload disconnects, not 100-second query execution timeouts.
Activity
fileservice: avoid full-object rereads during pending cache publicati…
VioletQwQ-0 commentedon Sep 15, 2026
QA handoff(合并后验证):
9089d7c3e34f06ecb06479816cbb53d6be1178b2,当前 main 为9d5cc76db1ef1b7572235455667bc3703a1e12db。34947682163通过,实际原始场景的 mixed FULLTEXT/IVF 冷启动超时是否完全消失仍未证实。QA required=yes;issue 保持 OPEN,等待部署验证。
Ariznawlll commentedon Sep 16, 2026
今晚跑了回归明天更新
Ariznawlll commentedon Sep 17, 2026
测试通过。
验证环境:
原问题场景验证结果:
原问题中复制表首次访问约 100 秒后断连、nqft 累计失败 2 次的现象未再出现,问题已修复。
fileservice: avoid full-object rereads during pending cache publicati…
fileservice: avoid full-object rereads during pending cache publicati…