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
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1469
Problem
Two bugs affecting users of Neo4j Community Edition:
1.
update_nodenot syncing Qdrant payload (High severity)Neo4jCommunityGraphDBinheritsupdate_nodefrom the parentNeo4jGraphDB, 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 oldstatus: activatedpayload.2. Missing
scheduledependency indocker/requirements.txt(Critical severity)reorganizer.py(Thread-3, which handles conflict detection and memory archiving) imports theschedulelibrary. Whileschedule>=1.2.2is declared inpyproject.tomland present inrequirements-full.txt, it was absent fromdocker/requirements.txt. This caused anImportErroron Thread-3 startup when deploying with the standard Docker requirements, silently disabling conflict detection and memory archiving.Solution
neo4j_community.py: Overrideupdate_nodeinNeo4jCommunityGraphDBto first call the parent's Neo4j update, then sync the relevant fields to Qdrant viavec_db.update(). Sync failures are logged as warnings and do not abort the Neo4j update.docker/requirements.txt: Addschedule==1.2.2(matching the version already pinned inrequirements-full.txt).Testing
update_nodeoverride follows the same Qdrant interaction pattern used inadd_nodeandadd_nodes_batch.scheduleversion matches the constraint inpyproject.toml(>=1.2.2,<2.0.0) and the pin inrequirements-full.txt.