Skip to content

Commit abd3bbe

Browse files
committed
fix: flush surreal writer after file_metadata persistence
Critical bug: file_metadata was being queued but never flushed to database, causing project_metadata and file_metadata tables to remain empty. Root cause: persist_file_metadata() was called after flush_surreal_writer(), so metadata writes were queued but never persisted before shutdown. Fix: Added flush_surreal_writer() call after persist_file_metadata() at line 1237 to ensure all metadata is written to SurrealDB. This fixes incremental indexing change detection which depends on file_metadata records.
1 parent b8199ef commit abd3bbe

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

crates/codegraph-mcp/src/indexer.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,6 +1234,7 @@ impl ProjectIndexer {
12341234
info!("💾 Updating file metadata for change tracking");
12351235
let file_paths_only: Vec<PathBuf> = files.iter().map(|(p, _)| p.clone()).collect();
12361236
self.persist_file_metadata(&file_paths_only, &nodes, &edges).await?;
1237+
self.flush_surreal_writer().await?;
12371238

12381239
// COMPREHENSIVE INDEXING COMPLETION SUMMARY
12391240
info!("🎉 INDEXING COMPLETE - REVOLUTIONARY AI DEVELOPMENT PLATFORM READY!");

0 commit comments

Comments
 (0)