Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 38484 invoked from network); 17 Sep 2010 13:13:46 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 17 Sep 2010 13:13:46 -0000 Received: (qmail 55244 invoked by uid 500); 17 Sep 2010 13:13:46 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 54707 invoked by uid 500); 17 Sep 2010 13:13:43 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 54699 invoked by uid 99); 17 Sep 2010 13:13:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Sep 2010 13:13:42 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of minfrin@sharp.fm designates 72.32.122.20 as permitted sender) Received: from [72.32.122.20] (HELO chandler.sharp.fm) (72.32.122.20) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Sep 2010 13:13:33 +0000 Received: from chandler.sharp.fm (localhost [127.0.0.1]) by chandler.sharp.fm (Postfix) with ESMTP id 1CC207807A for ; Fri, 17 Sep 2010 08:13:13 -0500 (CDT) Received: from [172.31.120.255] (unknown [212.58.232.179]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client did not present a certificate) (Authenticated sender: minfrin@sharp.fm) by chandler.sharp.fm (Postfix) with ESMTP id B8A2278077 for ; Fri, 17 Sep 2010 08:13:12 -0500 (CDT) Message-Id: <639EEE61-66A6-4B53-B077-E836F1F125DF@sharp.fm> From: Graham Leggett To: dev@httpd.apache.org In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: mod_disk_cache: making commit_entity() atomic Date: Fri, 17 Sep 2010 15:13:11 +0200 References: <73045DBA-6220-49BF-8818-09F97C996235@sharp.fm> X-Mailer: Apple Mail (2.936) X-Virus-Scanned: ClamAV using ClamSMTP X-Virus-Checked: Checked by ClamAV on apache.org On 17 Sep 2010, at 1:41 PM, Niklas Edmundsson wrote: > I personally favor designs needs at most O_EXCL style write locking. > > Having been bitten by various lock-related issues over the years I'm > in favor of a explicit-lock-free design if it can be done cleanly > and with good performance. > > If going this route, I'd suggest to put the entire path to the data > file in the header and not just a uniqifying string (to make it > easier to split hashing of header and data in the future). The problem with this is that if you bake the location of the file into the cache, you would never be able to move the cache around. Is there a benefit to keeping headers and bodies separate? Regards, Graham --