mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-25 14:44:28 +00:00
When two Zed instances share the same data directory (e.g. a release build and a dev build running simultaneously), SQLite operations can fail with "database is locked" (error code 5), surfacing as a "Failed to Launch" error in the agent panel. The root cause is `PRAGMA busy_timeout=1` in `crates/db/src/db.rs`, which gives SQLite only 1ms to wait for a write lock before giving up. With WAL mode, the actual lock hold times are microseconds — the problem isn't long-held locks, it's that we give up before even trying to wait. During startup, both instances hit the DB heavily for workspace restoration, so even tiny overlaps fail. This changes `busy_timeout` from 1ms to 500ms, giving SQLite more room to retry without (hopefully) any perceptible delay to the user. Closes AI-20 Release Notes: - N/A |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| LICENSE-GPL | ||
| README.md | ||
Building Queries
First, craft your test data. The examples folder shows a template for building a test-db, and can be ran with cargo run --example [your-example].
To actually use and test your queries, import the generated DB file into https://sqliteonline.com/