-
Notifications
You must be signed in to change notification settings - Fork 319
perf(memory): enable vector index usage by checking for existing indexes #514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a08d1b6
6267575
ced88b6
23b49c0
54938be
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -379,15 +379,15 @@ impl Tool for MemorySaveTool { | |
| } | ||
| } | ||
|
|
||
| // Ensure the FTS index exists so full_text_search queries work. | ||
| // Safe to call repeatedly — no-ops if the index already exists. | ||
| // Ensure vector and FTS indexes exist (prevents 30-minute rebuild loop) | ||
| // Safe to call repeatedly — skips creation if indexes already exist. | ||
| if let Err(error) = self | ||
| .memory_search | ||
| .embedding_table() | ||
| .ensure_fts_index() | ||
| .ensure_indexes_exist() | ||
| .await | ||
| { | ||
| tracing::warn!(%error, "failed to ensure FTS index after memory save"); | ||
| tracing::warn!(%error, "failed to ensure indexes after memory save"); | ||
|
Comment on lines
+382
to
+390
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don’t lose post-insert maintenance on the save path. After switching this branch to As per coding guidelines "Use 🤖 Prompt for AI Agents |
||
| } | ||
|
|
||
| if let Some(event_context) = &self.event_context | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honor cancellation during index optimization.
At Line 95,
optimize_indexes()is awaited directly instead of usingmaintenance_cancelable_op(...). If cancellation arrives after merge completes, this step can still run to completion and weaken the “exit quickly” contract forrun_maintenance_with_cancel.🤖 Prompt for AI Agents