-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REGRESSION (iOS 16): LocalStorage writes fail after ~2.5MB #4758
REGRESSION (iOS 16): LocalStorage writes fail after ~2.5MB #4758
Conversation
EWS run on previous version of this PR (hash d95d64c) |
d95d64c
to
98a2302
Compare
EWS run on previous version of this PR (hash 98a2302) |
98a2302
to
636c90b
Compare
EWS run on previous version of this PR (hash 636c90b) |
Is it really true that exceeding quota currently erases all your (under-quota) LocalStorage? If so, does this patch address that symptom? |
In network process, all updates in the same transaction will be lost because transaction is aborted. Normally we commit 500ms after transaction starts (e3fff83). |
I see: Not all items are lost, just all items in the current 500ms batch. |
636c90b
to
52bbe8f
Compare
EWS run on previous version of this PR (hash 52bbe8f) |
52bbe8f
to
7fe083a
Compare
EWS run on previous version of this PR (hash 7fe083a) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
7fe083a
to
b7e1da2
Compare
EWS run on current version of this PR (hash b7e1da2) |
https://bugs.webkit.org/show_bug.cgi?id=245479 <rdar://100252023> Reviewed by Chris Dumez. We set the maximum size of LocalStorage database to be 5MB, because quota is 5MB. But SQLite has overhead, which means the file size can reach 5MB when the stored content is much smaller than that. To avoid this issue, now we let SQLiteStorageArea keep track of the actual content size and use that size to do quota computation, instead of setting hard limit on database file. * Source/WebKit/NetworkProcess/storage/SQLiteStorageArea.cpp: (WebKit::SQLiteStorageArea::isEmpty): (WebKit::SQLiteStorageArea::prepareDatabase): (WebKit::SQLiteStorageArea::startTransactionIfNecessary): (WebKit::SQLiteStorageArea::getItem): (WebKit::SQLiteStorageArea::getAllItemsFromDatabase): (WebKit::SQLiteStorageArea::initializeCache): (WebKit::SQLiteStorageArea::allItems): (WebKit::SQLiteStorageArea::setItem): (WebKit::SQLiteStorageArea::removeItem): (WebKit::SQLiteStorageArea::clear): * Source/WebKit/NetworkProcess/storage/SQLiteStorageArea.h: Canonical link: https://commits.webkit.org/255044@main
b7e1da2
to
0297f12
Compare
Committed 255044@main (0297f12): https://commits.webkit.org/255044@main Reviewed commits have been landed. Closing PR #4758 and removing active labels. |
0297f12
b7e1da2
π wpeπ mac-debugπ§ͺ ios-wk2π mac-AS-debugπ§ͺ gtk-wk2π§ͺ api-iosπ§ͺ api-macπ§ͺ api-gtkπ§ͺ mac-wk1π§ͺ mac-AS-debug-wk2