SQLITE_IOERR_ROLLBACK_ATOMIC
SQLiteFATALCriticalI/O Errorofficial confidence

I/O error rolling back atomic write

Production Risk

Critical — database state is unknown.

What this means

SQLITE_IOERR_ROLLBACK_ATOMIC (7946) is returned when the VFS cannot roll back a failed atomic write. The database state is unknown and may require recovery or restore.

Why it happens
  1. 1Hardware failure during atomic rollback.
  2. 2VFS error aborting the atomic write batch.
How to reproduce

ROLLBACK on a database using atomic write VFS after another error.

trigger — this will error
trigger — this will error
# Occurs when ROLLBACK itself fails on an atomic-write VFS
# → indeterminate database state

expected output

sqlite3.DatabaseError: disk I/O error

Fix 1

Fix 2

Fix 3

What not to do

Sources
Official documentation ↗

sqlite3.h — SQLITE_IOERR_ROLLBACK_ATOMIC = 7946

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All SQLite errors