]> git.kaiwu.me - nginx.git/commit
Merge of r4339, r4340, r4341:
authorMaxim Dounin <mdounin@mdounin.ru>
Sun, 5 Feb 2012 13:34:08 +0000 (13:34 +0000)
committerMaxim Dounin <mdounin@mdounin.ru>
Sun, 5 Feb 2012 13:34:08 +0000 (13:34 +0000)
commit6f7a1824b5e38194146dd8516c48a4a7663a0d14
tree40cd5a7d7e1bebc208870d27c7a9167f2cda8558
parentcb15836d9afc3a663c0811db3f47ed43010d7c7b
Merge of r4339, r4340, r4341:

Cache fixes:

*) Obsolete code removed.

   The ngx_http_cache() and ngx_http_no_cache_set_slot() functions
   were replaced in 0.8.46 and no longer used since then.

*) Handling of cache files with long headers.

   There are two possible situations which can lead to this: response
   was cached with bigger proxy_buffer_size value (and nginx was
   restared since then, i.e. shared memory zone content was lost), or
   due to the race in the cache update code (see [1]) we've end up
   with fcn->body_start from a different response stored in shared
   memory zone.

*) Only complain on long locked entries.

   There have been multiple reports of cases where a real locked entry
   was removed, resulting in a segmentation fault later in a worker
   which locked the entry.  It looks like default inactive timeout isn't
   enough in real life.

   For now just ignore such locked entries, and move them to the top of
   the inactive queue to allow processing of other entries.

[1] http://mailman.nginx.org/pipermail/nginx-devel/2011-September/001287.html
src/http/ngx_http_file_cache.c