If the last variant was given an explicit percentage to reach 100%, it
did not cover hash values on the range boundary or due to accumulating
rounding error. Now this corresponds to the configuration with "*".
for (i = 0; i < ctx->parts.nelts; i++) {
sum = part[i].percent ? sum + part[i].percent : 10000;
+
+ if (sum == 10000) {
+ part[i].percent = 0;
+ }
+
if (sum > 10000) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"percent total is greater than 100%%");
for (i = 0; i < ctx->parts.nelts; i++) {
sum = part[i].percent ? sum + part[i].percent : 10000;
+
+ if (sum == 10000) {
+ part[i].percent = 0;
+ }
+
if (sum > 10000) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"percent total is greater than 100%%");