From: Junio C Hamano <gitster@pobox.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: Jeff King <peff@peff.net>,
git@vger.kernel.org, Patrick Ohly <patrick.ohly@intel.com>
Subject: Re: [PATCH 2/2] odb/source-loose: fix existence checks for newly written objects
Date: Fri, 06 Nov 2026 08:02:13 -0800 [thread overview]
Message-ID: <xmqq5wyalzi2.fsf@gitster.g> (raw)
In-Reply-To: <au23Hvzp09yrym9s@pks.im> (Patrick Steinhardt's message of "Fri, 6 Nov 2026 12:16:46 +0100")
Patrick Steinhardt <ps@pks.im> writes:
> On Thu, Nov 05, 2026 at 02:43:14PM -0500, Jeff King wrote:
>> On Wed, Nov 04, 2026 at 01:16:35PM +0100, Patrick Steinhardt wrote:
>> ...
>> So I kind of wonder if prefetch_cache_entries(), along with any caller
>> doing an OBJECT_INFO_FOR_PREFETCH check, ought to omit the QUICK flag.
>> It would mean that the normal case of having missing partial objects
>> (about to be fetched) would cause us to re-scan the local pack list, but
>> that's not _that_ expensive, especially compared to the fetch we're
>> about to do.
>
> Yeah, that's a valid point. Honestly, by now I'm almost urged to just
> drop the QUICK flag altogther. It's a source of bugs, and the longer we
> look at it the more cases we find where the existing users thereof are
> buggy in specific edge cases. We just recently removed one user of
> QUICK, and this here is another dubious case. I wouldn't be surprised if
> we could find edge cases for the other, remaining users, as well.
> ...
>> > We could in theory fix this by flushing all the loose object caches
>> > again, like we used to do before 5946a564cdd. But that wouldn't address
>> > the root cause: the cache would still be stale unless somebody does a
>> > non-QUICK read for a missing object. Instead, fix the bug by updating
>> > the cache whenever we write a new loose object.
OK. At least this change hides this specific failure mode. Can we
include some documentation that we may want to rethink the "QUICK"
thing and audit its current uses (if we decide to keep it, that is)
and move on with this change?
odb.h | 3 +++
1 file changed, 3 insertions(+)
diff --git c/odb.h w/odb.h
index dd85b880a7..61ff443d46 100644
--- c/odb.h
+++ w/odb.h
@@ -386,6 +386,9 @@ enum object_info_flags {
/*
* This is meant for bulk prefetching of missing blobs in a partial
* clone. Implies OBJECT_INFO_SKIP_FETCH_OBJECT and OBJECT_INFO_QUICK.
+ *
+ * NEEDSWORK: rethink if QUICK is desired in this context.
+ * cf. <au23Hvzp09yrym9s@pks.im>
*/
OBJECT_INFO_FOR_PREFETCH = (OBJECT_INFO_SKIP_FETCH_OBJECT | OBJECT_INFO_QUICK),
};
next prev parent reply other threads:[~2026-11-06 16:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 12:16 [PATCH 0/2] odb/source-loose: fix failing existence checks caused by stale cache Patrick Steinhardt
2026-11-04 12:16 ` [PATCH 1/2] odb/source-loose: extract logic to retrieve subdirectory bitmap Patrick Steinhardt
2026-11-04 12:16 ` [PATCH 2/2] odb/source-loose: fix existence checks for newly written objects Patrick Steinhardt
2026-11-04 17:47 ` Junio C Hamano
2026-11-05 19:43 ` Jeff King
2026-11-06 11:16 ` Patrick Steinhardt
2026-11-06 16:02 ` Junio C Hamano [this message]
2026-11-04 12:57 ` [PATCH 0/2] odb/source-loose: fix failing existence checks caused by stale cache Kristofer Karlsson
2026-11-04 16:27 ` Derrick Stolee
2026-11-05 0:09 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq5wyalzi2.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=patrick.ohly@intel.com \
--cc=peff@peff.net \
--cc=ps@pks.im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.