RESOLVED FIXED204027
Add size file for CacheStorage
https://bugs.webkit.org/show_bug.cgi?id=204027
Summary Add size file for CacheStorage
Sihui Liu
Reported 2019-11-08 15:34:18 PST
... so we can look at the size file and get the size of record without waiting for Caches to initialize.
Attachments
Patch (8.04 KB, patch)
2019-11-08 15:52 PST, Sihui Liu
no flags
Patch (7.71 KB, patch)
2019-11-11 16:19 PST, Sihui Liu
no flags
Patch for landing (7.67 KB, patch)
2019-11-11 17:05 PST, Sihui Liu
no flags
Patch (9.70 KB, patch)
2019-11-12 13:39 PST, Sihui Liu
no flags
Patch for landing (9.49 KB, patch)
2019-11-12 15:58 PST, Sihui Liu
no flags
Patch for landing (9.26 KB, patch)
2019-11-12 16:03 PST, Sihui Liu
no flags
Sihui Liu
Comment 1 2019-11-08 15:52:39 PST
youenn fablet
Comment 2 2019-11-08 17:08:36 PST
Comment on attachment 383174 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=383174&action=review > Source/WebKit/ChangeLog:8 > + No behavior change as the file is not in use now. I do not think we should do that in NetworkCacheStorage. Instead, we could do it in CacheStorage::Caches::writeRecord/removeRecord/writeCachesToDisk.
Sihui Liu
Comment 3 2019-11-11 16:19:08 PST
youenn fablet
Comment 4 2019-11-11 16:55:10 PST
Comment on attachment 383313 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=383313&action=review > Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp:470 > + m_ioQueue->dispatch([path = path.isolatedCopy(), size]() mutable { mutable? > Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp:481 > + auto sizeString = String::number(size).utf8(); Could be a oneliner. > Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp:512 > + return String::fromUTF8(buffer.data()).toUIntStrict(); toUInt64Strict > Source/WebKit/NetworkProcess/cache/CacheStorageEngine.h:88 > + static Optional<uint64_t> readSizeFile(const String& path); 'path' not really useful.
Sihui Liu
Comment 5 2019-11-11 17:05:21 PST
Created attachment 383319 [details] Patch for landing
WebKit Commit Bot
Comment 6 2019-11-11 17:49:33 PST
Comment on attachment 383319 [details] Patch for landing Clearing flags on attachment: 383319 Committed r252351: <https://trac.webkit.org/changeset/252351>
WebKit Commit Bot
Comment 7 2019-11-11 17:49:35 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 8 2019-11-11 17:50:16 PST
Truitt Savell
Comment 9 2019-11-12 11:05:51 PST
It looks like the added assertion in https://trac.webkit.org/changeset/252351/webkit is causing testing to exit early on Mac and iOS wk2 debug Build: https://build.webkit.org/builders/Apple%20Mojave%20Debug%20WK2%20%28Tests%29/builds/5776 crash: Thread 6 Crashed:: Dispatch queue: com.apple.WebKit.CacheStorageEngine.serialBackground 0 com.apple.JavaScriptCore 0x000000012d434ad0 WTFCrash + 16 (Assertions.cpp:305) 1 com.apple.JavaScriptCore 0x000000012e94dbfb WTFCrashWithInfo(int, char const*, char const*, int) + 27 2 com.apple.JavaScriptCore 0x000000012d472958 WTF::FileSystemImpl::unlockAndCloseFile(int) + 104 (FileSystem.cpp:365) 3 com.apple.WebKit 0x000000010de4fc6a WebKit::CacheStorage::Engine::writeSizeFile(WTF::String const&, unsigned long long)::$_48::operator()() const::'lambda'()::operator()() const + 26 (CacheStorageEngine.cpp:474)
Truitt Savell
Comment 10 2019-11-12 11:07:45 PST
Reverted r252351 for reason: casued 50+ crashes on Mac and iOS wk2 debug Committed r252369: <https://trac.webkit.org/changeset/252369>
Sihui Liu
Comment 11 2019-11-12 13:39:11 PST
Sihui Liu
Comment 12 2019-11-12 15:58:00 PST
Created attachment 383396 [details] Patch for landing
Sihui Liu
Comment 13 2019-11-12 16:03:00 PST
Created attachment 383397 [details] Patch for landing
WebKit Commit Bot
Comment 14 2019-11-12 17:24:34 PST
Comment on attachment 383397 [details] Patch for landing Clearing flags on attachment: 383397 Committed r252381: <https://trac.webkit.org/changeset/252381>
WebKit Commit Bot
Comment 15 2019-11-12 17:24:36 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.