Project
vgrep
Description
Database insert operations for files and chunks are not wrapped in transactions. If the process crashes or is interrupted between inserting a file and its chunks, the database will be left in an inconsistent state with orphan records.
Error Message
No error - silent data inconsistency.
Debug Logs
System Information
- Bounty Version: 0.1.0
- OS: Ubuntu 24.04 LTS
- Rust: 1.75+
Screenshots
No response
Steps to Reproduce
- Start indexing a large directory
- Kill the process (Ctrl+C, SIGKILL, power failure) during indexing
- The database may have:
- Files without chunks (orphan files)
- Or if using INSERT OR REPLACE, partial re-indexing could lose data
Expected Behavior
- Use transactions for multi-step operations
- Either all chunks for a file are inserted, or none
- Database remains consistent after any crash
Actual Behavior
- Each INSERT is auto-committed immediately
- Crash can leave partial data
- Orphan files or missing chunks possible
Additional Context
No response
Project
vgrep
Description
Database insert operations for files and chunks are not wrapped in transactions. If the process crashes or is interrupted between inserting a file and its chunks, the database will be left in an inconsistent state with orphan records.
Error Message
Debug Logs
System Information
Screenshots
No response
Steps to Reproduce
Expected Behavior
Actual Behavior
Additional Context
No response