[PATCH 01 of 31] Cache: fix another "stalled cache updating" alert
Kirill A. Korinskiy
catap at catap.ru
Mon Jun 27 22:04:49 MSD 2011
On Mon, Jun 27, 2011 at 21:06, Maxim Dounin <mdounin at mdounin.ru> wrote:
> # HG changeset patch
> # User Maxim Dounin <mdounin at mdounin.ru>
> # Date 1309178032 -14400
> # Node ID b857d44e9644325dec7d63b8561ae3b4dfa16150
> # Parent 1c167244d2fdb064c159012c50a7ae3fd1ed254a
> Cache: fix another "stalled cache updating" alert.
> @@ -2991,16 +2982,19 @@ ngx_http_upstream_finalize_request(ngx_h
>
>
[..]
> #if (NGX_HTTP_CACHE)
>
> - if (u->cacheable && r->cache) {
> - time_t valid;
> -
> - if (rc == NGX_HTTP_BAD_GATEWAY || rc == NGX_HTTP_GATEWAY_TIME_OUT)
> {
> -
> - valid = ngx_http_file_cache_valid(u->conf->cache_valid, rc);
> -
> - if (valid) {
> - r->cache->valid_sec = ngx_time() + valid;
> - r->cache->error = rc;
> + if (r->cache) {
> +
> + if (u->cacheable) {
> + time_t valid;
> +
> + if (rc == NGX_HTTP_BAD_GATEWAY || rc ==
> NGX_HTTP_GATEWAY_TIME_OUT) {
> +
> + valid = ngx_http_file_cache_valid(u->conf->cache_valid,
> rc);
> +
> + if (valid) {
> + r->cache->valid_sec = ngx_time() + valid;
> + r->cache->error = rc;
> + }
> }
> }
>
this a broken patch. I see another code at
http://mdounin.ru/hg/nginx-vendor-current/file/1c167244d2fd/src/http/ngx_http_upstream.c#l2991
--
wbr, Kirill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx-devel/attachments/20110627/2f0fb00e/attachment.html>
More information about the nginx-devel
mailing list