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).
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.mjssuch asgetContextFrontier,getNode, andgetNeighborswere still synchronously querying the empty local memory store viathis.db.nodes.get(id). This resulted innullresponses (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.
this.db.getAdjacentNodes([id], 'both')securely preceding the memory queries insideGraphService.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).