DescriptionIndexedDB: 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
Committed: https://crrev.com/f27dd1d7e9322388546c613cfed39bafda153859
Cr-Commit-Position: refs/heads/master@{#313998}
Patch Set 1 #
Total comments: 12
Patch Set 2 : Review feedback #Patch Set 3 : Rebased #
Messages
Total messages: 13 (3 generated)
|