Title: [188953] releases/WebKitGTK/webkit-2.10
Revision
188953
Author
carlo...@webkit.org
Date
2015-08-26 00:49:53 -0700 (Wed, 26 Aug 2015)

Log Message

Merge r188755 - Regression(r188698): http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html is very flaky
https://bugs.webkit.org/show_bug.cgi?id=148205

Reviewed by Antti Koivisto.

Source/WebKit2:

After r188640, successful revalidation of resources in the memory cache
would cause us to drop the corresponding resource in the disk cache.
This patch addresses the issue by not removing the cache entry if the
response is a successful revalidation (i.e. status code == 304).

Longer term, we should probably update the entry in the disk cache (if
it exists) when it is revalidated by the memory cache. Currently,
revalidation by the memory cache bypasses the disk cache and goes
straight to the network. Then, when the response comes back as a 304,
we try and store the response in the cache. However, a 304 status code
is not cacheable so the cache rejects it.

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::store):

LayoutTests:

* http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html:
Drop temporary fix landed in r188698 to make the test less flaky.

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog (188952 => 188953)


--- releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog	2015-08-26 07:44:58 UTC (rev 188952)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog	2015-08-26 07:49:53 UTC (rev 188953)
@@ -1,3 +1,25 @@
+2015-08-21  Chris Dumez  <cdu...@apple.com>
+
+        Regression(r188698): http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html is very flaky
+        https://bugs.webkit.org/show_bug.cgi?id=148205
+
+        Reviewed by Antti Koivisto.
+
+        * http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html:
+        Drop temporary fix landed in r188698 to make the test less flaky.
+
+2015-08-20  Chris Dumez  <cdu...@apple.com>
+
+        REGRESSION: http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html is very flaky
+        https://bugs.webkit.org/show_bug.cgi?id=148205
+
+        Unreviewed, give the disk cache a chance to settle down before querying
+        the resource again. This fixes the flakiness locally. Longer term, I will
+        try and figure out why the cache is sometimes revalidating if the resource
+        is requested very quickly after.
+
+        * http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html:
+
 2015-08-19  Chris Dumez  <cdu...@apple.com>
 
         WebKit may keep outdated entry in the disk cache after a reload

Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit2/ChangeLog (188952 => 188953)


--- releases/WebKitGTK/webkit-2.10/Source/WebKit2/ChangeLog	2015-08-26 07:44:58 UTC (rev 188952)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit2/ChangeLog	2015-08-26 07:49:53 UTC (rev 188953)
@@ -1,3 +1,25 @@
+2015-08-21  Chris Dumez  <cdu...@apple.com>
+
+        Regression(r188698): http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html is very flaky
+        https://bugs.webkit.org/show_bug.cgi?id=148205
+
+        Reviewed by Antti Koivisto.
+
+        After r188640, successful revalidation of resources in the memory cache
+        would cause us to drop the corresponding resource in the disk cache.
+        This patch addresses the issue by not removing the cache entry if the
+        response is a successful revalidation (i.e. status code == 304).
+
+        Longer term, we should probably update the entry in the disk cache (if
+        it exists) when it is revalidated by the memory cache. Currently,
+        revalidation by the memory cache bypasses the disk cache and goes
+        straight to the network. Then, when the response comes back as a 304,
+        we try and store the response in the cache. However, a 304 status code
+        is not cacheable so the cache rejects it.
+
+        * NetworkProcess/cache/NetworkCache.cpp:
+        (WebKit::NetworkCache::Cache::store):
+
 2015-08-19  Chris Dumez  <cdu...@apple.com>
 
         WebKit may keep outdated entry in the disk cache after a reload

Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp (188952 => 188953)


--- releases/WebKitGTK/webkit-2.10/Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp	2015-08-26 07:44:58 UTC (rev 188952)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp	2015-08-26 07:49:53 UTC (rev 188953)
@@ -407,8 +407,11 @@
         LOG(NetworkCache, "(NetworkProcess) didn't store, storeDecision=%d", storeDecision);
         auto key = makeCacheKey(originalRequest);
 
-        // Make sure we don't keep a stale entry in the cache.
-        remove(key);
+        auto isSuccessfulRevalidation = response.httpStatusCode() == 304;
+        if (!isSuccessfulRevalidation) {
+            // Make sure we don't keep a stale entry in the cache.
+            remove(key);
+        }
 
         if (m_statistics)
             m_statistics->recordNotCachingResponse(key, storeDecision);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to