Correctness: hero_db store uses blocking rusqlite in async context #109
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_aibroker#109
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: Medium
Location
crates/hero_aibroker_lib/src/store/hero_db.rsFinding
All SQLite operations use blocking
rusqlitecalls directly in async handlers:rust\npub async fn increment_usage(...) -> Result<()> {\n let mut conn = self.conn.lock().unwrap(); // blocking\n conn.execute(...)?; // blocking\n}\nImpact
Recommendation
tokio::task::spawn_blockingfor all SQLite operations\n- Or usesqlxwith async SQLite support\n- Consider WAL mode for concurrent reads