Skip to content

v21.1.3

Choose a tag to compare

@atdrendel atdrendel released this 05 Feb 11:11
· 6 commits to main since this release
044cf23

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.