Skip to content

fix: sync Qdrant payload on update_node in Neo4j community edition and add schedule dep#1496

Open
octo-patch wants to merge 1 commit intoMemTensor:mainfrom
octo-patch:fix/issue-1469-neo4j-community-qdrant-sync-schedule-dep
Open

fix: sync Qdrant payload on update_node in Neo4j community edition and add schedule dep#1496
octo-patch wants to merge 1 commit intoMemTensor:mainfrom
octo-patch:fix/issue-1469-neo4j-community-qdrant-sync-schedule-dep

Conversation

@octo-patch
Copy link
Copy Markdown
Contributor

Fixes #1469

Problem

Two bugs affecting users of Neo4j Community Edition:

1. update_node not syncing Qdrant payload (High severity)

Neo4jCommunityGraphDB inherits update_node from the parent Neo4jGraphDB, which only updates Neo4j. The community edition stores vectors in an external Qdrant database, so key metadata fields (status, tags, memory_type, content, sources) were never propagated to Qdrant when a node was updated. This caused Neo4j and Qdrant to diverge — for example, archived memories would remain visible in vector searches because Qdrant still had the old status: activated payload.

2. Missing schedule dependency in docker/requirements.txt (Critical severity)

reorganizer.py (Thread-3, which handles conflict detection and memory archiving) imports the schedule library. While schedule>=1.2.2 is declared in pyproject.toml and present in requirements-full.txt, it was absent from docker/requirements.txt. This caused an ImportError on Thread-3 startup when deploying with the standard Docker requirements, silently disabling conflict detection and memory archiving.

Solution

  • neo4j_community.py: Override update_node in Neo4jCommunityGraphDB to first call the parent's Neo4j update, then sync the relevant fields to Qdrant via vec_db.update(). Sync failures are logged as warnings and do not abort the Neo4j update.

  • docker/requirements.txt: Add schedule==1.2.2 (matching the version already pinned in requirements-full.txt).

Testing

  • The update_node override follows the same Qdrant interaction pattern used in add_node and add_nodes_batch.
  • The schedule version matches the constraint in pyproject.toml (>=1.2.2,<2.0.0) and the pin in requirements-full.txt.

…d add schedule dep

Neo4jCommunityGraphDB.update_node only called the parent Neo4jGraphDB
implementation, which updates Neo4j but not the external Qdrant payload.
This caused Neo4j and Qdrant to diverge on key fields like status, tags,
and memory_type — archived memories could still appear in vector searches.

Fix: override update_node in Neo4jCommunityGraphDB to call the parent
and then sync key fields (status, tags, memory_type, content, sources)
to Qdrant via vec_db.update(). Sync errors are logged as warnings and do
not abort the Neo4j update.

Also add the missing schedule==1.2.2 dependency to docker/requirements.txt.
The reorganizer.py uses the schedule library (already in requirements-full.txt
and pyproject.toml) but it was absent from requirements.txt, causing an
ImportError when Thread-3 (conflict detection / memory archiving) started.

Fixes MemTensor#1469
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.

[Bug修复] Neo4j社区版update_node未同步Qdrant + schedule依赖缺失导致Thread-3启动失败

1 participant