Skip to content

Conversation

CaralHsi
Copy link
Collaborator

@CaralHsi CaralHsi commented Sep 2, 2025

Description

Summary:

NebulaGraphDB

  • Added shared pool cache & refcounting with thread-safe lock to reuse connections across instances.

  • Implemented _make_pool_key, _get_or_create_shared_pool, _release_shared_pool, close_all_shared_pools.

  • Updated init to use shared pool acquisition strategy instead of creating new pool each time.

  • Adjusted close() to only release shared pool when refcount reaches zero; added safe del.

  • Increased default query timeout from 5s → 10s.

  • Simplified node property parsing with _build_return_fields helper.

  • Added include_embedding option to get_neighbors_by_tag, improved return parsing.

  • Refactored multiple query result parsers to unify props extraction.

Searcher

  • Introduced dedicated ThreadPoolExecutor(max_workers=4) for async usage updates.

  • Changed _update_usage_history to work with batched payloads and safe info snapshotting.

  • Added _update_usage_history_worker for async DB updates with exception handling.

  • Fixed duplicated rerank top_k scaling in _retrieve_from_long_term_and_user and _retrieve_from_memcubes.

Fix: #(issue)

Docs Issue/PR: (docs-issue-or-pr-link)

Reviewer: @(reviewer)

Checklist:

  • I have performed a self-review of my own code | 我已自行检查了自己的代码
  • I have commented my code in hard-to-understand areas | 我已在难以理解的地方对代码进行了注释
  • I have added tests that prove my fix is effective or that my feature works | 我已添加测试以证明我的修复有效或功能正常
  • I have created related documentation issue/PR in MemOS-Docs (if applicable) | 我已在 MemOS-Docs 中创建了相关的文档 issue/PR(如果适用)
  • I have linked the issue to this PR (if applicable) | 我已将 issue 链接到此 PR(如果适用)
  • I have mentioned the person who will review this PR | 我已提及将审查此 PR 的人

@CaralHsi CaralHsi marked this pull request as ready for review September 2, 2025 09:29
@CaralHsi CaralHsi merged commit 0d85609 into MemTensor:dev Sep 2, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants