LearnNewsExamplesServices
Frontmatter
id9697
titleFix: GraphService direct lookups fail on Lazy Loading cache misses
stateClosed
labels
bugai
assigneestobiu
createdAtApr 4, 2026, 6:13 PM
updatedAtApr 4, 2026, 6:13 PM
githubUrlhttps://github.com/neomjs/neo/issues/9697
authortobiu
commentsCount1
parentIssue9673
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtApr 4, 2026, 6:13 PM

Fix: GraphService direct lookups fail on Lazy Loading cache misses

Closedbugai
tobiu
tobiu commented on Apr 4, 2026, 6:13 PM

Problem

After the implementation of Distributed Caching & Lazy Loading for the Native Edge Graph Database, the Graph DB no longer synchronously loads all nodes into the in-memory cache upon initialization. However, methods inside memory-core/services/GraphService.mjs such as getContextFrontier, getNode, and getNeighbors were still synchronously querying the empty local memory store via this.db.nodes.get(id). This resulted in null responses (e.g., "No context frontier configured") because the methods failed to trigger a lazy load from SQLite first.

Solution

Explicitly enforce lazy loading ahead of direct memory queries.

  • Inject this.db.getAdjacentNodes([id], 'both') securely preceding the memory queries inside GraphService.mjs. This guarantees that if a node is actively a cache miss, the engine drops down to SQLite to retrieve it and its vicinity.

Epic Link

This is a sub-issue of Epic #9673 (Hybrid GraphRAG).

tobiu added the bug label on Apr 4, 2026, 6:13 PM
tobiu added the ai label on Apr 4, 2026, 6:13 PM
tobiu added parent issue #9673 on Apr 4, 2026, 6:13 PM
tobiu referenced in commit ecbb80a - "fix(memory-core): Enforce SQLite lazy loading on direct node queries (#9697)" on Apr 4, 2026, 6:13 PM
tobiu assigned to @tobiu on Apr 4, 2026, 6:13 PM
tobiu
tobiu Apr 4, 2026, 6:13 PM

Fix committed and pushed. Explicit lazy loading added to GraphService.

tobiu closed this issue on Apr 4, 2026, 6:13 PM
tobiu cross-referenced by #9699 on Apr 4, 2026, 6:44 PM