Bug 236423

Summary: Exclude new LocalStorage directory from backup on iOS
Product: WebKit Reporter: Sihui Liu <sihui_liu>
Component: Website StorageAssignee: Sihui Liu <sihui_liu>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, darin, sihui_liu, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing none

Description Sihui Liu 2022-02-09 18:21:08 PST
...
Comment 1 Radar WebKit Bug Importer 2022-02-16 18:22:16 PST
<rdar://problem/89060863>
Comment 2 Sihui Liu 2022-02-16 21:15:15 PST
Created attachment 452308 [details]
Patch
Comment 3 Darin Adler 2022-02-17 01:10:22 PST
Comment on attachment 452308 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=452308&action=review

> Source/WebKit/ChangeLog:10
> +        We've been excluding LocalStorage data from backup on iOS since r212555, and we need to make sure this applies
> +        to new LocalStorage directory after migration (r289878).

What about on devices where the old code ran, the directory was created, but excludeFromBackup was not called? Are those devices permanently in an incorrect state? What will heal them?
Comment 4 Sihui Liu 2022-02-17 10:49:17 PST
Comment on attachment 452308 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=452308&action=review

>> Source/WebKit/ChangeLog:10
>> +        to new LocalStorage directory after migration (r289878).
> 
> What about on devices where the old code ran, the directory was created, but excludeFromBackup was not called? Are those devices permanently in an incorrect state? What will heal them?

The new LocalStorage directory is not in use yet: r289878 only adds code for migration. So this code is added before the directory is created. I am trying to make sure everything works correctly before we start to use the new directory.
Comment 5 Darin Adler 2022-02-17 11:25:49 PST
Comment on attachment 452308 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=452308&action=review

>>> Source/WebKit/ChangeLog:10
>>> +        to new LocalStorage directory after migration (r289878).
>> 
>> What about on devices where the old code ran, the directory was created, but excludeFromBackup was not called? Are those devices permanently in an incorrect state? What will heal them?
> 
> The new LocalStorage directory is not in use yet: r289878 only adds code for migration. So this code is added before the directory is created. I am trying to make sure everything works correctly before we start to use the new directory.

Sounds good
Comment 6 Sihui Liu 2022-02-17 22:33:06 PST
Created attachment 452483 [details]
Patch for landing
Comment 7 EWS 2022-02-17 23:47:14 PST
Committed r290115 (247459@main): <https://commits.webkit.org/247459@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 452483 [details].