Ema has uploaded a new change for review.

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

Change subject: 4.1.3-1wm4: gethdr_extrachance
......................................................................

4.1.3-1wm4: gethdr_extrachance

Change-Id: Id47a7fc006a81bf0435819fefd94c8a0c825d2d9
---
M debian/changelog
A debian/patches/0005-gethdr_extrachance.patch
D debian/patches/0005-remove_bad_extrachance_code.patch
M debian/patches/series
4 files changed, 54 insertions(+), 47 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/varnish4 
refs/changes/84/321384/1

diff --git a/debian/changelog b/debian/changelog
index 297cfc9..319edd8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+varnish (4.1.3-1wm4) jessie-wikimedia; urgency=medium
+
+  * Make extrachance upper bound configurable.
+
+ -- Emanuele Rocca <e...@wikimedia.org>  Fri, 11 Nov 2016 12:01:18 +0100
+
 varnish (4.1.3-1wm3) jessie-wikimedia; urgency=medium
 
   * Add 0005-remove_bad_extrachance_code.patch: the extrachance code is
diff --git a/debian/patches/0005-gethdr_extrachance.patch 
b/debian/patches/0005-gethdr_extrachance.patch
new file mode 100644
index 0000000..f8144ad
--- /dev/null
+++ b/debian/patches/0005-gethdr_extrachance.patch
@@ -0,0 +1,47 @@
+diff --git a/bin/varnishd/cache/cache_backend.c 
b/bin/varnishd/cache/cache_backend.c
+index 039d3b2..4324894 100644
+--- a/bin/varnishd/cache/cache_backend.c
++++ b/bin/varnishd/cache/cache_backend.c
+@@ -177,7 +177,7 @@ static int __match_proto__(vdi_gethdrs_f)
+ vbe_dir_gethdrs(const struct director *d, struct worker *wrk,
+     struct busyobj *bo)
+ {
+-      int i, extrachance = 1;
++      int i, extrachance = cache_param->gethdr_extrachance;
+       struct backend *bp;
+       struct vbc *vbc;
+ 
+@@ -232,7 +232,7 @@ vbe_dir_gethdrs(const struct director *d, struct worker 
*wrk,
+                   bo->req->req_body_status != REQ_BODY_CACHED)
+                       break;
+               VSC_C_main->backend_retry++;
+-      } while (extrachance);
++      } while (extrachance-- > 0);
+       return (-1);
+ }
+ 
+diff --git a/include/tbl/params.h b/include/tbl/params.h
+index 5c3f46b..ec0a8cf 100644
+--- a/include/tbl/params.h
++++ b/include/tbl/params.h
+@@ -458,6 +458,20 @@ PARAM(
+ )
+ 
+ PARAM(
++      /* name */      gethdr_extrachance,
++      /* typ */       uint,
++      /* min */       "0",
++      /* max */       "100",
++      /* default */   "1",
++      /* units */     NULL,
++      /* flags */     EXPERIMENTAL,
++      /* s-text */
++      "Number of extra chances in vbe_dir_gethdrs.",
++      /* l-text */    "",
++      /* func */      NULL
++)
++
++PARAM(
+       /* name */      gzip_buffer,
+       /* typ */       bytes_u,
+       /* min */       "2k",
diff --git a/debian/patches/0005-remove_bad_extrachance_code.patch 
b/debian/patches/0005-remove_bad_extrachance_code.patch
deleted file mode 100644
index d159f8a..0000000
--- a/debian/patches/0005-remove_bad_extrachance_code.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From: Brandon Black <bbl...@wikimedia.org>
-Date: Tue Nov  8 11:59:43 UTC 2016
-Subject: remove_bad_extrachance_code
-
-Bug: T150247
-diff --git a/bin/varnishd/cache/cache_backend.c 
b/bin/varnishd/cache/cache_backend.c
-index 039d3b2..f88bf8e 100644
---- a/bin/varnishd/cache/cache_backend.c
-+++ b/bin/varnishd/cache/cache_backend.c
-@@ -177,7 +177,7 @@ static int __match_proto__(vdi_gethdrs_f)
- vbe_dir_gethdrs(const struct director *d, struct worker *wrk,
-     struct busyobj *bo)
- {
--      int i, extrachance = 1;
-+      int i; /*, extrachance = 1;*/
-       struct backend *bp;
-       struct vbc *vbc;
- 
-@@ -201,8 +201,10 @@ vbe_dir_gethdrs(const struct director *d, struct worker 
*wrk,
-                       return (-1);
-               }
-               AN(bo->htc);
-+              /*
-               if (vbc->state != VBC_STATE_STOLEN)
-                       extrachance = 0;
-+                      */
- 
-               i = V1F_SendReq(wrk, bo, &bo->acct.bereq_hdrbytes, 0);
- 
-@@ -225,6 +227,7 @@ vbe_dir_gethdrs(const struct director *d, struct worker 
*wrk,
-                */
-               vbe_dir_finish(d, wrk, bo);
-               AZ(bo->htc);
-+              /*
-               if (i < 0)
-                       break;
-               if (bo->req != NULL &&
-@@ -232,7 +235,8 @@ vbe_dir_gethdrs(const struct director *d, struct worker 
*wrk,
-                   bo->req->req_body_status != REQ_BODY_CACHED)
-                       break;
-               VSC_C_main->backend_retry++;
--      } while (extrachance);
-+      } while (extrachance);*/
-+      } while (0);
-       return (-1);
- }
diff --git a/debian/patches/series b/debian/patches/series
index 273c363..44fc4a0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,4 @@
 0001-varnishd-persistent-addrarg.patch
 0002-varnishd-persistent-fallocate.patch
 0004-varnishd-persistent-mmap-exit.patch
-0005-remove_bad_extrachance_code.patch
+0005-gethdr_extrachance.patch

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id47a7fc006a81bf0435819fefd94c8a0c825d2d9
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/varnish4
Gerrit-Branch: debian-wmf
Gerrit-Owner: Ema <e...@wikimedia.org>

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

Reply via email to