WeKnora/internal
wizardchen fc6f160eff fix(retriever/doris): code review cleanup
针对 4cce6f2e(接入 Apache Doris)的 code review 修复,主要修正若干阻断性
问题与可读性问题,并剔除不应进入主仓的本地工作流文件。

阻断性修复:
- docker-compose: Doris 镜像由 2.1.0 升至 4.1.0。原 2.1.0 不支持 HNSW
  ANN、cosine_distance_approximate 与 Stream Load partial_columns,
  按当前 DDL 一启动就会失败。
- DSN 字面量拼接改用 mysql.Config.FormatDSN()。原 fmt.Sprintf 在用户名/
  密码包含 `@`/`:`/`/` 等字符时会跑偏。覆盖 health check 与 engine
  factory 两处。

健壮性修复:
- 新增 validateEmbedding,写入与查询前拒绝 NaN/±Inf;strconv.FormatFloat
  对非有限值会输出 "NaN"/"+Inf" 拼成无效 SQL。
- waitANNReady 改为后台 goroutine + 独立 context,避免新维度首次写入路径
  阻塞最长 30s;ANN 未就绪时 Doris 会自动退化为 brute-force。

清理:
- annIndexReady 移除最终两个分支都 return true 的冗余写法。
- Save 移除冗余的双重 toDorisVectorEmbedding。
- testDorisConnection 把 "5.7.99 Doris-4.1.0" 解析为裸 "4.1.0",与
  Postgres/ES 的版本格式对齐。

剔除(不应合入主仓):
- docs/wiki/集成扩展/Doris改动与上游同步.md:纯 fork 维护工作流文档。
- scripts/e2e-doris.sh:作者本地 E2E 验证清单。

测试:
- repository_test 用 require.Eventually 适配 ANN 异步轮询。
- 现有 doris 单测全部通过。
2026-05-09 00:31:03 +08:00
..
agent perf(wiki): move ingest log to event table and index to on-demand API 2026-05-08 21:48:52 +08:00
application fix(retriever/doris): code review cleanup 2026-05-09 00:31:03 +08:00
assets feat(assets): add ASR test audio file and embed it in the application 2026-04-02 21:27:27 +08:00
common feat: Implement deadlock retry mechanism for chunk creation 2026-04-22 21:17:21 +08:00
config feat: Introduce agent type presets for smart-reasoning mode 2026-04-22 21:18:20 +08:00
container fix(retriever/doris): code review cleanup 2026-05-09 00:31:03 +08:00
database fix: update environment configuration for debugging and logging, enhance SQLite FTS5 table management, and improve API base URL handling 2026-04-11 18:51:16 +08:00
datasource feat(observability): extend Langfuse tracing across asynq pipeline 2026-04-24 13:16:47 +08:00
errors feat: Add agent configuration and cleanup scripts for database migrations 2025-11-05 23:18:44 +08:00
event fix: improve tenant access token logging and update test cases 2026-04-22 21:17:30 +08:00
handler perf(wiki): move ingest log to event table and index to on-demand API 2026-05-08 21:48:52 +08:00
im fix(im): clamp reconnect backoff to avoid int64 overflow → busy loop 2026-05-05 00:36:18 +08:00
infrastructure fix(chunker): recognise CN chapter titles and multi-level numeric headings 2026-05-06 22:14:16 +08:00
logger feat(observability): integrate Langfuse for LLM token tracking and tracing 2026-04-24 10:29:19 +08:00
mcp feat(mcp): implement reconnection logic for MCP tool calls and tool listing 2026-03-31 11:57:15 +08:00
middleware fix(im): rewrite private storage URLs to HTTP in IM channel replies 2026-04-30 11:40:30 +08:00
models chore(llm): add fire-once OpenAI-layer stream diagnostic logs 2026-05-07 18:28:28 +08:00
router fix: 为前端静态资源设置正确的 Cache-Control 响应头 2026-05-07 12:08:02 +08:00
runtime init commit 2025-08-05 15:08:07 +08:00
sandbox feat: optimize security and deployment of agent skills 2026-02-04 20:08:49 +08:00
searchutil feat(prompt): enhance question rewriting and intent classification in prompt templates 2026-04-16 23:15:02 +08:00
stream feat(redis): add REDIS_USERNAME support for Redis ACL 2026-02-04 19:38:40 +08:00
tracing feat(observability): extend Langfuse tracing across asynq pipeline 2026-04-24 13:16:47 +08:00
types feat(retriever): 接入 Apache Doris 4.1 作为向量数据库 2026-05-08 21:59:35 +08:00
utils fix(crypto): fail loudly when encrypted DB fields cannot be decrypted 2026-04-30 15:17:56 +08:00