IndexedDB: Ensure overlapping commits correctly update blob journals
The IDB implementation uses journals to track blob files which are to-be-written or to-be-deleted so that the files can be cleaned up following a crash or abort. The journal records are updated as part of a two-phase commit, and during database deletion. The journal updates and cleanups incorrectly assumed that only one transaction could commit at a time per backing store, so the first phase of a second transaction could inadvertently "clean up" the in progress work by a previous transaction, resulting in missing files. Untangle this and ensure that (1) transaction commits only append/remove journal entries, not the entire journal, and (2) changes outside transactions are deferred if transactions are running. R=cmumford@chromium.org BUG=447836 Review URL: https://codereview.chromium.org/865013002 Cr-Commit-Position: refs/heads/master@{#313998}
Showing
This diff is collapsed.
Please register or sign in to comment