Releases: shareup/sqlite
v21.2.0
v21.1.4
v21.1.3
This release attempts to fix flaky CI tests when on-disk databases are created with transactions set to IMMEDIATE
. This release tries to ensure all reads and writes finish before truncation happens and the database is closed.
#Background
In an iOS app that consumes SQLite, migration tests have occasionally been failing with errors similiar to the following:
BUG IN CLIENT OF libsqlite3.dylib: database integrity compromised by API violation: vnode unlinked while in use
invalidated open fd
The errors mentioned the WAL or SHM files were being deleted before the database had been closed. The errors do not seem to be related to the content of the tests themselves. Instead, it seems like the migration tests have periodically started failing instead of the other database tests is the migration tests create databases on disk, whereas the other tests use in-memory databases. The databases are being created in a temporary directory and are not being manually deleted by the tests.
The tests started failing after moving to defaulting to IMMEDIATE
transactions based on the GRDB documentation.
v21.1.2
Fixes SQLITE_BUSY
errors caused by the shift to IMMEDIATE
transactions.
Updating the transaction type from the default DEFERRED
to IMMEDIATE
exposed some issues with the way SQLite wrapped GRDB. SQLite was wrapping some writes in an unnecessary transaction. This caused issues because IMMEDIATE
transactions immediately begin a write, meaning other writes will receive a SQLITE_BUSY
error. Before applying the changes in this release, vacuuming and checkpointing tests failed when IMMEDIATE
transactions were used.
21.1.1
- Fall back to
URL(filePath:directoryHint:)
ifURL(string:)
fails - Use immediate transactions for writes
v21.1.0
- Add support for
VACUUM INTO
- Update to Swift 5.9
v21.0.5
v21.0.4
- Update CombineExtensions to latest major version which introduces a new implementation to
Publisher.throttle(while:latest:)
.
v21.0.3
- Update to GRDB 6.17.0
- Resume the database on
UIApplication.willEnterForegroundNotification