[Varnish] #1324: vdir_pick_by_weight() will fail to pick any backend if weight is equal vd->total_weight

Varnish varnish-bugs at varnish-cache.org
Thu Jul 4 19:31:12 CEST 2013


#1324: vdir_pick_by_weight() will fail to pick any backend if weight is equal
vd->total_weight
-------------------+--------------------
 Reporter:  jw     |       Type:  defect
   Status:  new    |   Priority:  normal
Milestone:         |  Component:  build
  Version:  trunk  |   Severity:  normal
 Keywords:         |
-------------------+--------------------
 vdir_pick_by_weight() returns WRONG(""); if vdir_pick_be() is caled with
 w=1.0 as a will never be larger

 if (w < a)
   return (u);


 As assert(w >= 0.0 && w <= 1.0) in vdir_pick_be() indicates, it should be
 possible to call it with an value of 1.0, thus i assume the correct fix
 would be:

 if (w <= a)
   return (u);

-- 
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1324>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator




More information about the varnish-bugs mailing list