mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-11 08:03:09 -06:00
SQLite has rather unfortunate defaults for concurrent accesses, leading to database locked errors. https://github.com/matrix-org/dendrite/pull/1290 appears to try to fix some of this, but doesn't appear to cover a concurrent read+write and the errors still happened in large quantities when I joined the dendrite room. This PR enables WAL for concurrent read+write and much better performance. It also sets busy_timeout to 10 seconds to not immediately fail operations while the database is locked, providing a DB level solution to PR 1290's objective with additional coverage. I chose this particular location to add the two statements as they should apply to every SQLite DB connection. From a quick test it looks as if the db locked errors are gone with this change. |
||
|---|---|---|
| .. | ||
| migrate.go | ||
| migrate_test.go | ||
| postgres.go | ||
| postgres_wasm.go | ||
| sql.go | ||
| sqlutil.go | ||
| sqlutil_test.go | ||
| trace.go | ||
| trace_driver.go | ||
| trace_driver_wasm.go | ||
| uri.go | ||
| writer.go | ||
| writer_dummy.go | ||
| writer_exclusive.go | ||