[Webkit-unassigned] [Bug 202705] IndexedDB: on-going IDBTransaction is not active any more after process is suspended

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 8 18:50:46 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=202705

--- Comment #3 from Sihui Liu <sihui_liu at apple.com> ---
(In reply to mrschmidt from comment #2)
> Sihui, thank you for replying so quickly. The strategy you suggested is what
> we are going to implement as a mitigation, but it requires us to audit and
> potentially rewrite all of our usages of IndexedDb to ensure that the code
> that runs in our transactions is idempotent. This is a significant
> engineering challenge for us and makes IndexedDb development for everyone
> much more difficult. 
> 
> Would it be possible to delay suspension of the process until all IndexedDb
> transactions are committed?

We already request delay if we know there are on-going IDB transactions, but there is a timeout for that. (And currently the web page would not know when the clock is ticking.) After the timeout, WebKit process will get a final notification from system, and have to do cleanup immediately in case processes get suspended in weird state or get killed. This cleanup includes aborting on-going transactions (because transaction should not be interrupted and after process is suspended, other active process may perform on the same storage), so you can view this transaction error as a result of process suspension on iOS.

To help mitigate this issue, probably you could try committing more often, or making transaction shorter, if possible.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20191009/248ed0bc/attachment.html>


More information about the webkit-unassigned mailing list