Hello Ema, jenkins-bot,
I'd like you to do a code review. Please visit
https://gerrit.wikimedia.org/r/387059
to review the following change.
Change subject: Revert "varnish: ensure consistent CL"
......................................................................
Revert "varnish: ensure consistent CL"
This reverts commit 8c5c941e46ba8a91af98b984413bd051cd3502fe.
Change-Id: I55e8a0864ad53a601f208d4c3d235b5f1c9b8643
---
M modules/varnish/templates/misc-backend.inc.vcl.erb
M modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
2 files changed, 15 insertions(+), 7 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/59/387059/1
diff --git a/modules/varnish/templates/misc-backend.inc.vcl.erb
b/modules/varnish/templates/misc-backend.inc.vcl.erb
index 5ac4859..875849b 100644
--- a/modules/varnish/templates/misc-backend.inc.vcl.erb
+++ b/modules/varnish/templates/misc-backend.inc.vcl.erb
@@ -20,6 +20,21 @@
set beresp.uncacheable = true;
return (deliver);
}
+
+<% if not @varnish_testing -%>
+ if (!bereq.http.X-Next-Is-Cache) {
+<% end -%>
+ // Direct backend caches:
+ // Disable streaming if no Content-Length present. This is the
default in
+ // varnish3, but in varnish4 this should convert them to responses
+ // containing a Content-Length in the common case, so that upper caches
+ // can make size-based decisions.
+ if (!beresp.http.Content-Length) {
+ set beresp.do_stream = false;
+ }
+<% if not @varnish_testing -%>
+ }
+<% end -%>
}
sub cluster_be_deliver { }
diff --git a/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
b/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
index 0e198ce..258e629 100644
--- a/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
@@ -197,13 +197,6 @@
unset beresp.http.Public-Key-Pins;
unset beresp.http.Public-Key-Pins-Report-Only;
- // If this is the backend-most varnish and the response has no CL
header,
- // disable streaming so that all other varnishes will have access to CL
for
- // size-based decisions. See https://phabricator.wikimedia.org/P6190
- if (!bereq.http.X-Next-Is-Cache && !beresp.http.Content-Length) {
- set beresp.do_stream = false;
- }
-
call cluster_be_backend_response_early; // e.g. to fix up Vary-slotting
in bereq
call wm_common_backend_response;
call cluster_be_backend_response;
--
To view, visit https://gerrit.wikimedia.org/r/387059
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I55e8a0864ad53a601f208d4c3d235b5f1c9b8643
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack <[email protected]>
Gerrit-Reviewer: Ema <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits