[Webkit-unassigned] [Bug 202137] New: IndexedDB asks user for gigabytes of storage, even though megabytes are actually used

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 24 00:05:36 PDT 2019


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

            Bug ID: 202137
           Summary: IndexedDB asks user for gigabytes of storage, even
                    though megabytes are actually used
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: Macintosh
                OS: macOS 10.14
            Status: NEW
          Severity: Critical
          Priority: P2
         Component: New Bugs
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: radexpl at gmail.com

IndexedDB size calculations seem buggy, leading to very bad user experience. Our web app (4.nozbe.com) is based on LokiJS, which uses IndexedDB only as a storage mechanism -- and so it saves the entire LokiJS data object in just one IndexedDB row.

On a fairly large account, the database size can grow up too 100MB.

And yet, after a few database operations, Safari asks the user for >1GB of storage… after accepting, and a few database operations (each of which will save the new version of database to disk, but keeping below <100MB of size of both the database and WAL/SHL files), it will ask for 1.2GB… 1.4GB… every couple of minutes.

This is a regression in Safari 13 / Safari TP. The issue does not occur on Safari 12. I suspect this Webkit commit might be the cause of the issue: https://github.com/WebKit/webkit/commit/36aa2f1a9d05d9efdcf41929c206e2dfdc6e6ded#diff-714b919c798f296a141098072faac979

(originally posted as https://feedbackassistant.apple.com/feedback/7315350)

. . .

I extracted a repro demo here (the numbers are a little different, but basic principle is the same):

https://web.radexpl.now.sh/

1. open in safari 13 / safari TP,
2. click "generate 10,000 records" a few times, open first item on the list, click "moderate", try with second item, click generate 10,000 items again — after a few of these actions (<30 seconds to reproduce), Safari will ask if it can increase db size to 1.2GB
3. click yes or refresh page - then check under `/Users/radex/Library/SafariTechnologyPreview/Databases/___IndexedDB/v1/https_web.radexpl.now.sh_0/` - database won't be actually larger than 250MB

-- 
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/20190924/4d753682/attachment.html>


More information about the webkit-unassigned mailing list