Return-Path: X-Original-To: apmail-httpd-bugs-archive@www.apache.org Delivered-To: apmail-httpd-bugs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 554B5D6A0 for ; Fri, 24 Aug 2012 10:54:43 +0000 (UTC) Received: (qmail 51224 invoked by uid 500); 24 Aug 2012 10:54:42 -0000 Delivered-To: apmail-httpd-bugs-archive@httpd.apache.org Received: (qmail 50875 invoked by uid 500); 24 Aug 2012 10:54:42 -0000 Mailing-List: contact bugs-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: "Apache HTTPD Bugs Notification List" List-Id: Delivered-To: mailing list bugs@httpd.apache.org Received: (qmail 50816 invoked by uid 99); 24 Aug 2012 10:54:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Aug 2012 10:54:39 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.115] (HELO eir.zones.apache.org) (140.211.11.115) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Aug 2012 10:54:37 +0000 Received: by eir.zones.apache.org (Postfix, from userid 80) id 2F6225C0E; Fri, 24 Aug 2012 10:54:16 +0000 (UTC) From: bugzilla@apache.org To: bugs@httpd.apache.org Subject: [Bug 53767] htcacheclean deletes stale "vary" header files even if cache limits aren't reached Date: Fri, 24 Aug 2012 10:54:14 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Apache httpd-2 X-Bugzilla-Component: mod_cache_disk / mod_disk_cache X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: andy.hutson+apache@gmail.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: bugs@httpd.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 https://issues.apache.org/bugzilla/show_bug.cgi?id=53767 --- Comment #2 from andyh --- >From http://svn.apache.org/repos/asf/httpd/httpd/trunk/support/htcacheclean.c (which is later than the one we're running, but I believe has the same issue); looks like this is the section that's doing it: /* single data and header files may be deleted either in realclean * mode or if their modification timestamp is not within a * specified positive or negative offset to the current time. * this handling is necessary due to possible race conditions * between apache and this process */ case HEADER: current = apr_time_now(); nextpath = apr_pstrcat(p, path, "/", d->basename, CACHE_HEADER_SUFFIX, NULL); if (apr_file_open(&fd, nextpath, APR_FOPEN_READ | APR_FOPEN_BINARY, APR_OS_DEFAULT, p) == APR_SUCCESS) { len = sizeof(format); if (apr_file_read_full(fd, &format, len, &len) == APR_SUCCESS) { if (format == VARY_FORMAT_VERSION) { apr_time_t expires; len = sizeof(expires); if (apr_file_read_full(fd, &expires, len, &len) == APR_SUCCESS) { apr_finfo_t finfo; apr_file_close(fd); if (apr_stat(&finfo, apr_pstrcat(p, nextpath, CACHE_VDIR_SUFFIX, NULL), APR_FINFO_TYPE, p) || finfo.filetype != APR_DIR) { delete_entry(path, d->basename, nodes, p); } else if (expires < current) { delete_entry(path, d->basename, nodes, p); } break; } } Specifically, this part: else if (expires < current) { delete_entry(path, d->basename, nodes, p); } This seems to be deleting expired vary header files by design. But this breaks CacheStaleOnError handling, as well as (but to a lesser extent) the stale-while-revalidate function that CacheLock provides, for any resources that vary. Not sure if there's any reason to be deleting these header files? They'll get deleted later on anyway, in purge(), if the cache is above limits. If there's no other need, should these three lines simply be removed? -- 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