httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 53767] New: htcacheclean deletes stale "vary" header files even if cache limits aren't reached
Date Thu, 23 Aug 2012 15:28:43 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=53767

          Priority: P2
            Bug ID: 53767
          Assignee: bugs@httpd.apache.org
           Summary: htcacheclean deletes stale "vary" header files even if
                    cache limits aren't reached
          Severity: normal
    Classification: Unclassified
                OS: Linux
          Reporter: andy.hutson+apache@gmail.com
          Hardware: PC
            Status: NEW
           Version: 2.2.21
         Component: mod_cache_disk / mod_disk_cache
           Product: Apache httpd-2

Created attachment 29268
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29268&action=edit
strace output

For a resource that contains a "Vary" header, mod_cache creates a .header file
containing the "vary" headers, and then creates a subdirectory
(<hash>.header.vary), which in turn contains the actual .header and .data
files.

Assuming the cache is not above the limit specified by htcacheclean, stale
content should remain in place so that it can be while revalidating content or
if there's an error (ie CacheStaleOnError behaviour). For non-varying
resources, this works fine.

However, for resources that "vary", it appears there is a bug in htcacheclean.
Once the content is stale, it deletes the top level .header file (containing
the "vary" headers), even if the cache is within limits, meaning mod_cache is
unable to serve the stale content (htcacheclean reports "0 entries deleted"
though). It would appear that creating an empty .data file alongside the
.header file prevents this from happening.

I'm attaching the output of the following, for reference, which shows the
unlink call at line 173:
strace -o ~/strace.out -s 512 htcacheclean -r -v -p /data/httpcache/httpd/ -l
1000k

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message