mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-03 12:03:02 +00:00
BUG/MINOR: stats: correctly report throttle rate of low weight servers
The throttling of low weight servers (<16) could mistakenly be reported
as > 100% due to a rounding that was performed before a multiply by 100
instead of after. This was introduced in 1.5-dev20 when fixing a previous
reporting issue by commit d32c399
(MINOR: stats: report correct throttling
percentage for servers in slowstart).
It should be backported if the patch above is backported.
This commit is contained in:
parent
b169eba58d
commit
e38feed966
@ -75,7 +75,7 @@ static inline unsigned int server_throttle_rate(struct server *sv)
|
||||
if (!sv->uweight)
|
||||
return 100;
|
||||
|
||||
return 100U * (px->lbprm.wmult * sv->eweight + px->lbprm.wdiv - 1) / (px->lbprm.wdiv * sv->uweight);
|
||||
return (100U * px->lbprm.wmult * sv->eweight + px->lbprm.wdiv - 1) / (px->lbprm.wdiv * sv->uweight);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user