[Webkit-unassigned] [Bug 202705] IndexedDb: Attempt to get record without an in-progress transaction

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 8 16:26:02 PDT 2019


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

Sihui Liu <sihui_liu at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sihui_liu at apple.com

--- Comment #1 from Sihui Liu <sihui_liu at apple.com> ---
(In reply to mrschmidt from comment #0)
> We work on the Firestore SDK, which provide real-time data synchronization
> for users of Google Cloud Firestore. As part of our offering, we ship an
> IndexedDb-enabled Web client. Our users have reported a severe problem with
> iOS 13 that essentially means that we are currently unable to support iOS
> 13. 
> 
> With iOS 13, we have observed the following behavior:
> 
> 1) The Firestore SDK opens a new IndexedDb transaction/
> 2) The Safari tab goes in the background.
> 3) WebKit terminates the network, which stops the IDBServer
> (https://trac.webkit.org/browser/trunk/Source/WebKit/NetworkProcess/
> NetworkProcess.cpp#L2117)
> 4) The app goes back in the foreground and resumes its operation. Firestore
> tries to use the transaction it opened in step 1 and receives "Attempt to
> get a record from database without an in-progress transaction"
> 
> We believe that this is likely a regression introduced by the fix for
> https://bugs.webkit.org/show_bug.cgi?id=197050
> 
> See https://github.com/firebase/firebase-js-sdk/issues/2232 for further
> comments and analysis.

Hi,

Thanks for the report. That change was made to protect WebKit process from being killed when holding database lock for ongoing transactions in the background. Process getting killed could error out all IDB connections and lead to some bad results.

The current WebKit behavior is when Webkit process is suspended (which should happen some time after app is backgrounded), ongoing IDB transactions are forcibly aborted.

We may figure out something smarter than this for the backgrounding problem. For temporary workaround on iOS 13, you could start a new transaction on the same db and replay IDB requests if needed (may need some effort to record the requests in an on-going transaction).

-- 
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/20191008/7d725ca2/attachment-0001.html>


More information about the webkit-unassigned mailing list