Skip to content

Commit 26785fc

Browse files
committed
Indexing: Fix post-scan reconciler "DB is locked"
- The replay connection was opened with `open_write_connection`, contending with the writer thread's exclusive write lock in WAL mode - Changed to `open_read_connection` — the reconciler only reads (path resolution), all writes go through the writer channel - This also prevented `scan_completed_at` from being persisted (early return on error), causing a full rescan on every restart
1 parent 795e48b commit 26785fc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • apps/desktop/src-tauri/src/indexing

apps/desktop/src-tauri/src/indexing/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ impl IndexManager {
622622
});
623623

624624
// Open a read connection for path resolution during replay
625-
let replay_conn = match IndexStore::open_write_connection(&writer.db_path()) {
625+
let replay_conn = match IndexStore::open_read_connection(&writer.db_path()) {
626626
Ok(c) => c,
627627
Err(e) => {
628628
log::warn!("Reconciler: failed to open read connection for replay: {e}");

0 commit comments

Comments
 (0)