Ema has submitted this change and it was merged.

Change subject: cache_text frontend VCL: backend_fetch vs misspass
......................................................................


cache_text frontend VCL: backend_fetch vs misspass

In Varnish 3 we call text_common_misspass_restore_cookie from vcl_miss
and vcl_pass to make sure the same code is executed before fetching
objects from the backend.

Varnish 4 introduced vcl_backend_fetch, which is called by both vcl_miss
and vcl_pass.

Somehow similarly to the changes introduced in fc3d2b4, this commit
makes our v3 VCL call text_common_misspass_restore_cookie from vcl_miss
and vcl_pass, while the v4 code only calls it from vcl_backend_fetch.

Bug: T131503
Change-Id: I9de27d0cc862567743009d6fcdf1157a2dbc4d09
---
M modules/varnish/templates/text-frontend.inc.vcl.erb
1 file changed, 7 insertions(+), 1 deletion(-)

Approvals:
  Ema: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/varnish/templates/text-frontend.inc.vcl.erb 
b/modules/varnish/templates/text-frontend.inc.vcl.erb
index e0d7f10..1919693 100644
--- a/modules/varnish/templates/text-frontend.inc.vcl.erb
+++ b/modules/varnish/templates/text-frontend.inc.vcl.erb
@@ -199,15 +199,21 @@
 sub cluster_fe_hit { }
 
 sub cluster_fe_miss {
+<% if not @varnish_version4 -%>
        call text_common_misspass_restore_cookie;
+<% end -%>
 }
 
 sub cluster_fe_pass {
+<% if not @varnish_version4 -%>
        call text_common_misspass_restore_cookie;
+<% end -%>
 }
 
 <% if @varnish_version4 -%>
-sub cluster_fe_backend_fetch { }
+sub cluster_fe_backend_fetch {
+       call text_common_misspass_restore_cookie;
+}
 <% end -%>
 
 sub cluster_fe_backend_response {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9de27d0cc862567743009d6fcdf1157a2dbc4d09
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ema <e...@wikimedia.org>
Gerrit-Reviewer: BBlack <bbl...@wikimedia.org>
Gerrit-Reviewer: Ema <e...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to