BBlack has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/279544

Change subject: cache_upload: remove support for If-Cached
......................................................................

cache_upload: remove support for If-Cached

I *think* this was all in support of our earlier upload/thumbs
architecture, back when the rendering servers actually did
If-Cached queries back into the front of varnish, or something
like that.  I don't see any If-Cached queries flowing in short log
samples today.  Could use more confirmation before killing this
needless complexity.

Change-Id: I1c0bc1885b88e64b8036b0e4db0654fa8e9f5ae3
---
M templates/varnish/upload-backend.inc.vcl.erb
M templates/varnish/upload-common.inc.vcl.erb
M templates/varnish/upload-frontend.inc.vcl.erb
3 files changed, 2 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/44/279544/1

diff --git a/templates/varnish/upload-backend.inc.vcl.erb 
b/templates/varnish/upload-backend.inc.vcl.erb
index 092244d..f0b541a 100644
--- a/templates/varnish/upload-backend.inc.vcl.erb
+++ b/templates/varnish/upload-backend.inc.vcl.erb
@@ -40,9 +40,7 @@
 
 sub cluster_be_hash { }
 
-sub cluster_be_hit {
-       call upload_common_hit;
-}
+sub cluster_be_hit { }
 
 sub cluster_be_miss {
        // Convert range requests into pass when over a certain threshold
@@ -52,10 +50,6 @@
                set bereq.http.Range = req.http.Range;
                std.log("Passing high range request: " + req.http.Range);
                return (pass);
-       }
-
-       if (req.http.If-Cached) {
-               error 412 "Entity not in cache";
        }
 }
 
diff --git a/templates/varnish/upload-common.inc.vcl.erb 
b/templates/varnish/upload-common.inc.vcl.erb
index 98dfeb7..068fda2 100644
--- a/templates/varnish/upload-common.inc.vcl.erb
+++ b/templates/varnish/upload-common.inc.vcl.erb
@@ -6,12 +6,6 @@
        }
 }
 
-sub upload_common_hit {
-       if (req.http.If-Cached && req.http.If-Cached != obj.http.Etag) {
-               error 412 "Etag mismatch";
-       }
-}
-
 sub upload_common_deliver {
        if (resp.http.X-Content-Range) {
                set resp.http.Content-Range = resp.http.X-Content-Range;
diff --git a/templates/varnish/upload-frontend.inc.vcl.erb 
b/templates/varnish/upload-frontend.inc.vcl.erb
index c060afe..cebb964 100644
--- a/templates/varnish/upload-frontend.inc.vcl.erb
+++ b/templates/varnish/upload-frontend.inc.vcl.erb
@@ -30,19 +30,12 @@
 
 sub cluster_fe_hash { }
 
-sub cluster_fe_hit {
-       call upload_common_hit;
-}
+sub cluster_fe_hit { }
 
 sub cluster_fe_miss {
        // Convert range requests into pass
        if (req.http.Range) {
                set bereq.http.Range = req.http.Range;
-               return (pass);
-       }
-
-       // Make sure If-Cached requests won't pollute the cache
-       if (req.http.If-Cached) {
                return (pass);
        }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/279544
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1c0bc1885b88e64b8036b0e4db0654fa8e9f5ae3
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack <bbl...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to