Skip to content

perf(queue): 流式调度语义向量化任务 - #3636

Merged
sponge225 merged 8 commits into
mainfrom
perf/stream-semantic-vectorization
Aug 10, 2026
Merged

sponge225 merged 8 commits into
mainfrom
perf/stream-semantic-vectorization

Conversation

@qin-ctx

@qin-ctx qin-ctx commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Description

语义处理改为在单个文件摘要生成后立即投递向量化任务,避免大型仓库解析期间在内存中累计所有文件全文。同时以 QueueFS 的任务工作索引和实际 Embedding 消息 ID 统一完成状态追踪,删除固定总数计数机制,并将默认语义并发从 64 降至 32。

Human Involvement

  • A human participated in the implementation or review loop
  • This PR was generated entirely by AI agents without human participation in the loop

Related Issue

无关联 Issue。

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

  • 文件摘要生成完成后立即投递 Embedding Queue,目录阶段只保留名称和摘要,降低大型仓库解析的峰值内存。
  • 使用 TaskWorkIndex 和实际 EmbeddingMsg ID 追踪任务与请求的完成状态,删除 EmbeddingTaskTracker、固定 total_count 及关联字段。
  • 将 add-resource 等解析入口统一纳入 parse 并发限制,并把默认语义并发及中英文配置文档从 64 调整为 32。

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • Linux
    • macOS
    • Windows

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Screenshots (if applicable)

不适用。

Additional Notes

  • 未新增测试用例;修改现有测试以覆盖流式向量化和消息 ID 级完成追踪,并删除旧 Tracker 的实现细节测试。
  • 聚焦测试结果:222 passed;Ruff 和 git diff --check 均通过。

@qin-ctx
qin-ctx marked this pull request as draft August 3, 2026 03:29
sponge225 added a commit that referenced this pull request Aug 10, 2026
@sponge225
sponge225 force-pushed the perf/stream-semantic-vectorization branch from 1d1e3b5 to f3c9115 Compare August 10, 2026 11:23
…vectorization-merge-main

# Conflicts:
#	openviking/service/core.py
#	openviking/storage/queuefs/embedding_tracker.py
#	openviking/storage/queuefs/queue_manager.py
#	openviking/storage/queuefs/semantic_dag.py
#	openviking/utils/embedding_utils.py
#	tests/storage/test_embedding_tracker.py
#	tests/storage/test_memory_semantic_stall.py
#	tests/storage/test_semantic_dag_incremental.py
#	tests/storage/test_semantic_dag_skip_files.py
#	tests/storage/test_semantic_dag_stats.py
#	tests/unit/test_vectorize_file_strategy.py
@sponge225
sponge225 marked this pull request as ready for review August 10, 2026 12:38
@sponge225
sponge225 merged commit b877aba into main Aug 10, 2026
7 of 8 checks passed
@sponge225
sponge225 deleted the perf/stream-semantic-vectorization branch August 10, 2026 13:24
@github-project-automation github-project-automation Bot moved this from Backlog to Done in OpenViking project Aug 10, 2026
frankyang2008-eng added a commit to frankyang2008-eng/OpenViking that referenced this pull request Oct 9, 2026
Sync upstream main (e546b79) - 19 commits, 315 files:

- refactor(client): remove Python embedded mode (volcengine#3712)
- perf(queue): stream semantic vectorization tasks (volcengine#3636)
- perf(queuefs): defer embedding content materialization (volcengine#3871)
- feat(memory): support event tag filtering (volcengine#3850)
- feat(pathlock): keep lease alive across handoff (volcengine#3903)
- feat(server): refresh read-replica API key index via store watcher (volcengine#3857)
- feat(agent-evolution): add trajectory date filters (volcengine#3915)
- feat(agent-evolution): add trajectory task query (volcengine#3856)
- feat(web-studio): add account deletion workflow (volcengine#3912)
- feat(web-studio): add scheduled resource sync management (volcengine#3909)
- fix(watch): avoid global lock during resource moves (volcengine#3833)
- fix(observer): ignore historical lock diagnostics in health (volcengine#3920)
- fix(session): validate archive names when loading history (volcengine#3922)
- fix(task-tracker): delete expired persisted tasks (volcengine#3913)
- fix(storage): exclude zero-byte files from index expectations (volcengine#3904)
- fix(semantic): reduce entity hallucinations in summaries (volcengine#3908)
- fix(retrieval): record first-turn session recalls (volcengine#3907)
- fix(opencode-plugin): serialize saveState to prevent ENOENT race (volcengine#3885)
- fix(examples): align quick start with server mode (volcengine#3923)

Reviewed: zero conflicts, all local dev-branch modifications preserved,
no references to deleted embedded client modules, config backward-compatible.
frankyang2008-eng pushed a commit to frankyang2008-eng/OpenViking that referenced this pull request Oct 9, 2026
* perf(queue): stream semantic vectorization tasks

* fix(queue): isolate semantic work context

* feat(config): make parse concurrency configurable

* test(queue): update semantic vectorization fakes

* fix(queue): correct semantic vectorization conflict resolution

---------

Co-authored-by: sponge225 <1670519171@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants