Commit Graph
20 Commits
Author SHA1 Message Date
Gwendal Roué 8fa434272e Make all read closures explicit in the documentation
The short form dbQueue.read(fetch) can confuse the reader.
2023-10-22 07:59:08 +02:00
Gwendal Roué 73b279b5c1 Document methods that fail if the wal file is missing or truncated 2023-06-01 19:15:21 +02:00
Gwendal Roué cedcfbe330 Mark opportunities for snapshot creation failure (including #1383) 2023-06-01 17:26:04 +02:00
Gwendal Roué 6d392f0a87 Use DatabaseError.connectionIsClosed() where appropriate 2023-03-16 13:44:08 +01:00
Gwendal Roué aff924a72b Upgrade Swiftlint and fix warnings 2023-02-04 11:23:14 +01:00
Gwendal Roué 0dd17a9a16 Turn ValueObservationScheduler into a protocol 2022-12-29 12:38:06 +01:00
Gwendal Roué e430b4ebd7 DatabaseSnapshotReader reentrant read is not unsafe 2022-11-25 08:15:14 +01:00
Gwendal Roué 10596e17bf Cleanup snapshot configurations 2022-11-23 19:42:12 +01:00
Gwendal Roué 0ba3dff901 Rewrite availability check for WAL snapshots
Also, enable WAL snapshots with SQLCipher, if SQLITE_ENABLE_SNAPSHOT is set.
2022-11-18 13:33:28 +01:00
Gwendal Roué fcf8ac43b7 Delete obsolete comment 2022-11-18 12:41:15 +01:00
Gwendal Roué 9b4d76ca37 Robustness: DatabaseSnapshotPool discards connections that have lost the snapshot 2022-11-18 08:53:39 +01:00
Gwendal Roué 9b663e3bcc Pool can discard elements after use 2022-11-18 08:52:52 +01:00
Gwendal Roué 8a42c11624 DatabaseSnapshotPool documentation 2022-11-17 22:38:41 +01:00
Gwendal Roué 79d4db7827 More DatabaseSnapshotPool tests 2022-11-17 21:56:01 +01:00
Gwendal Roué b1770e89b7 Introduce DatabaseSnapshotReader 2022-11-17 20:11:58 +01:00
Gwendal Roué 12d656d3a1 Let SQLite check if DatabaseSnapshotPool can be created 2022-11-17 20:01:17 +01:00
Gwendal Roué 0bc49460d7 DatabaseSnapshotPool uses its own pool of connections
In the previous implementation, the snapshot pool would use the same reader connections as the database pool. This would create problem with reentrant reads. Let's make things simple, and not share any database connection.
2022-11-17 18:36:17 +01:00
Gwendal Roué c4c0b1ce90 Test and fix unsafe and async DatabaseSnapshotPool 2022-11-14 19:10:52 +01:00
Gwendal Roué 9ac8c0703d Remove dead code 2022-11-14 19:02:10 +01:00
Gwendal Roué b8bc8273a9 Turn snapshot tokens into a proper reader: DatabaseSnapshotPool 2022-11-14 18:22:13 +01:00