In SQLite, an attempt to COMMIT a transaction in rollback-journal mode may fail with an SQLITE_BUSY error. The application may retry the COMMIT later on, and it may succeed.
If this happens when committing a multi-file transaction, each attempt to COMMIT creates a new master-journal file in the file-system. Only the master-journal file associated with the final, successful, COMMIT is deleted. Leaked master-journals are left in the file-system.
Also, at least one of the journal files involved in the transaction contains a master-journal pointer that points to a master-journal other than the last one created. This means the final COMMIT is not atomic across all database files. A particularly unlucky process or OS failure may leave the writes to a subset of the databases committed.
|