Welcome! Log In Create A New Profile

Advanced

[nginx] svn commit: r4992 - in trunk/src/http: . modules

Anonymous User
December 25, 2012 03:04AM
Author: vbart
Date: 2012-12-25 08:02:21 +0000 (Tue, 25 Dec 2012)
New Revision: 4992
URL: http://trac.nginx.org/nginx/changeset/4992/nginx

Log:
Upstream: fixed state resetting when switching to backup servers.

Based on patch by Thomas Chen (ticket #257).



Modified:
trunk/src/http/modules/ngx_http_upstream_least_conn_module.c
trunk/src/http/ngx_http_upstream_round_robin.c

Modified: trunk/src/http/modules/ngx_http_upstream_least_conn_module.c
===================================================================
--- trunk/src/http/modules/ngx_http_upstream_least_conn_module.c 2012-12-24 17:32:53 UTC (rev 4991)
+++ trunk/src/http/modules/ngx_http_upstream_least_conn_module.c 2012-12-25 08:02:21 UTC (rev 4992)
@@ -313,7 +313,9 @@
lcp->rrp.peers = peers->next;
pc->tries = lcp->rrp.peers->number;

- n = lcp->rrp.peers->number / (8 * sizeof(uintptr_t)) + 1;
+ n = (lcp->rrp.peers->number + (8 * sizeof(uintptr_t) - 1))
+ / (8 * sizeof(uintptr_t));
+
for (i = 0; i < n; i++) {
lcp->rrp.tried[i] = 0;
}

Modified: trunk/src/http/ngx_http_upstream_round_robin.c
===================================================================
--- trunk/src/http/ngx_http_upstream_round_robin.c 2012-12-24 17:32:53 UTC (rev 4991)
+++ trunk/src/http/ngx_http_upstream_round_robin.c 2012-12-25 08:02:21 UTC (rev 4992)
@@ -474,7 +474,9 @@
rrp->peers = peers->next;
pc->tries = rrp->peers->number;

- n = rrp->peers->number / (8 * sizeof(uintptr_t)) + 1;
+ n = (rrp->peers->number + (8 * sizeof(uintptr_t) - 1))
+ / (8 * sizeof(uintptr_t));
+
for (i = 0; i < n; i++) {
rrp->tried[i] = 0;
}

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] svn commit: r4992 - in trunk/src/http: . modules

Anonymous User 967 December 25, 2012 03:04AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 87
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready