Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115915 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 20203 invoked from network); 2 Sep 2021 10:39:38 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 2 Sep 2021 10:39:38 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 420A5180539 for ; Thu, 2 Sep 2021 04:15:47 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MISSING_HEADERS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 2 Sep 2021 04:15:46 -0700 (PDT) Received: by mail-pj1-f41.google.com with SMTP id u13-20020a17090abb0db0290177e1d9b3f7so1201315pjr.1 for ; Thu, 02 Sep 2021 04:15:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lyda.ie; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:cc; bh=yGoyQuzNvA/QmZ5/lVCcwNpAq5swHikKK+Dpe0JKJ0M=; b=Ptkf9slu5mFfRHWe5dW8wPBset97ISvx8r7mTwxqONeDzylDBBIQHMMxKf1VmCfYLJ EeMPNHoqj2mZAnisTN1glULczrc8zJ6rQKyT/yg9PB1cgH20AM5mnPaE+UloVu8yBPKT QofMPQ6rKbn1bXODW2N50yL0F0wQGjPOmcntGc+KWsV32NmpHVfmj62xqZmGkGgYuaFs Uru8NlIw6+BjDFIxtvtLRnTfjF8dNcCNj7IS1FBgbHg+DKzpkQ9X8G5vP+dZ5raZxCeQ 9/m6NIrdRQPC331vPD7DgyVPYQLB6GuvRvoaCyZZKz4vG+yeLheSt95+y+TWMkzkR/rC jEtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:cc; bh=yGoyQuzNvA/QmZ5/lVCcwNpAq5swHikKK+Dpe0JKJ0M=; b=LuYUBI+O20ZunSFXy+pwSHnFvwMa7rmHfVpj8peRWXqO62tHCSWbu2H5Nv9AZs24Ce KBPJqD3mSQUpuLJ3MI7zklTn9wVY79BYX+QJm++NrMxKkn847TqEbcqGICuOTRcPDEyD vsafikKvkNLKGAhyxoM5+sM8ahn6Q4BFnLXKobhZGaorQsc8qo9lzykucDZxn5Kreni2 4b9qv2cHzxI9ItVI5E/lnA9STGes8Xb5MoYfI58GQRkH6plphn4TnZ2JPPiyY1DiYwV7 +JPN+vRIQJ5QMQa+L58RjTZ0IUB4jpvX9UhyLSRwo86apkYAQAaEDw8OtrTeMXfIOVGi JjjQ== X-Gm-Message-State: AOAM531SMUIX4l+w+pRabtDM63F+ueopUG9xcLInqoUZWPKXlVrTxC7f Ps3MxGc5pBtUgJ211OmzIvKEIM9o+tMEVGm75ddCLjjQvwlwWA== X-Google-Smtp-Source: ABdhPJy3JrWntRaKvwB+pbQ6ooRryqkJzkmTFoTMhn/4C7EttzI9Xikkohp0nIHrXOWfbzKwseQcMmpZ0DpP+zj99X0= X-Received: by 2002:a17:903:2c2:b029:101:9c88:d928 with SMTP id s2-20020a17090302c2b02901019c88d928mr2482211plk.62.1630581344219; Thu, 02 Sep 2021 04:15:44 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 2 Sep 2021 12:15:33 +0100 Message-ID: Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Adding a way to disable the stat cache From: kevin@lyda.ie (Kevin Lyda) Just as an aside, Lynn and Peter are two more people who have had this issue - in addition to the folks mentioned in the various bugs about this. Really would like clear guidance on what's needed to move the PR on once I resolve the current merge conflict. On Thu, Sep 2, 2021 at 9:49 AM Peter Bowyer wrote: > On Thu, 2 Sept 2021 at 09:27, Kevin Lyda wrote: > > The change I've made will allow people to disable the > > cache so that it won't cause errors and it leaves the current broken > > behaviour in place. > > Is there any good reason not to remove it completely? Removing it completely would be ideal, however a number of people objected in the linked bug. And while it's not needed in modern Unix operating systems, it's not clear if Windows might benefit from this. Personally I'd argue that due to its buggy behaviour it should be removed. There's no way to make this work correctly in userspace so it's not a good place for it. OS and filesystem developers implemented caching on those levels because they have the state to properly maintain a cache. However if you use the filesystem a certain way and you pretend other processes can't modify a file out from under you, the current caching system could provide a performance benefit on OSs and filesystems that don't offer this sort of caching. And maybe someone depends on this. That's the best argument I can make for retaining it. > I've been bitten by the stat cache before and would be pleased to see it > gone for good. As have I. And I had to write some goofy sed scripts to insert clearstatcache() in order to stop rare bugs from popping up. Which means I had to experience it at least twice. Kevin