SQLite

View Ticket
Login
Ticket Hash: f3e5abed55378ccb11396096c25ca338b295a46c
Title: Problems retrying COMMIT after SQLITE_BUSY on multi-file transaction
Status: Fixed Type: Code_Defect
Severity: Important Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2010-07-30 11:37:32
Version Found In: 3.7.0 (likely all versions)
Description:
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.


Attachments: