Quantcast
Channel: Nginx Forum
Viewing all articles
Browse latest Browse all 53287

[nginx] svn commit: r5137 - trunk/src/http

$
0
0
Author: ru
Date: 2013-03-25 14:51:44 +0000 (Mon, 25 Mar 2013)
New Revision: 5137
URL: http://trac.nginx.org/nginx/changeset/5137/nginx

Log:
Upstream: removed rudiments of upstream connection caching.

This functionality is now provided by ngx_http_upstream_keepalive_module.


Modified:
trunk/src/http/ngx_http_upstream_round_robin.c
trunk/src/http/ngx_http_upstream_round_robin.h

Modified: trunk/src/http/ngx_http_upstream_round_robin.c
===================================================================
--- trunk/src/http/ngx_http_upstream_round_robin.c 2013-03-25 13:41:30 UTC (rev 5136)
+++ trunk/src/http/ngx_http_upstream_round_robin.c 2013-03-25 14:51:44 UTC (rev 5137)
@@ -373,7 +373,6 @@

ngx_int_t rc;
ngx_uint_t i, n;
- ngx_connection_t *c;
ngx_http_upstream_rr_peer_t *peer;
ngx_http_upstream_rr_peers_t *peers;

@@ -382,26 +381,6 @@

/* ngx_lock_mutex(rrp->peers->mutex); */

- if (rrp->peers->last_cached) {
-
- /* cached connection */
-
- c = rrp->peers->cached[rrp->peers->last_cached];
- rrp->peers->last_cached--;
-
- /* ngx_unlock_mutex(ppr->peers->mutex); */
-
-#if (NGX_THREADS)
- c->read->lock = c->read->own_lock;
- c->write->lock = c->write->own_lock;
-#endif
-
- pc->connection = c;
- pc->cached = 1;
-
- return NGX_OK;
- }
-
pc->cached = 0;
pc->connection = NULL;


Modified: trunk/src/http/ngx_http_upstream_round_robin.h
===================================================================
--- trunk/src/http/ngx_http_upstream_round_robin.h 2013-03-25 13:41:30 UTC (rev 5136)
+++ trunk/src/http/ngx_http_upstream_round_robin.h 2013-03-25 14:51:44 UTC (rev 5137)
@@ -42,10 +42,8 @@

struct ngx_http_upstream_rr_peers_s {
ngx_uint_t number;
- ngx_uint_t last_cached;

/* ngx_mutex_t *mutex; */
- ngx_connection_t **cached;

ngx_uint_t total_weight;


_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel

Viewing all articles
Browse latest Browse all 53287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>