Hot journal
A hot journal is a SQLite rollback journal that requires replay to recover an interrupted database transaction.
SQLite's rollback-mode checks require an existing journal larger than 512 bytes, a valid nonzero header, no RESERVED lock on the database, and either an existing named super-journal or no super-journal name. The lock check distinguishes recovery work from a current writer's journal. SQLite obtains recovery locks and replays a hot journal before reading the database. [1] A leftover journal whose named super-journal was deleted at group commit is not hot. [2] See the distinction between journal files and recovery decisions. [3] A disposable process-exit observation demonstrates journal retention after commit and rollback of unfinished writes; it is not a power-loss test. [4]
Relations
- related
- rollback-journal, sqlite-super-journal, crash-consistency, write-ahead-log, fsync
Advantages
- Lets SQLite identify unfinished rollback-mode work and recover before serving database reads. [1]
Limitations
- A journal filename alone does not establish hotness; its header, lock state and super-journal relationship matter. [1]
- Deleting or separating a hot journal from its database can remove information needed for recovery. [1]