git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3 0/6] odb/files: reload alternates on retry again

From
Patrick Steinhardt <ps@pks.im>
Date
Oct 29, 2026, 08:37 UTC
Message-ID
<auMFuqIR_2ltdSPY@pks.im>
In-Reply-To
<xmqq8q3hdcsg.fsf@gitster.g>
On Wed, Oct 28, 2026 at 09:12:47AM -0700, Junio C Hamano wrote:
Show 58 quoted lines
> H
> Patrick Steinhardt <ps@pks.im> writes:
> 
> > 3:  da5a24624e8 = 3:  8882555124e odb/source-files: reload alternates on retry
> > 4:  13e4e857f68 ! 4:  64d76b0ac94 odb/source-files: simplify directory duplication detection
> >     @@ Commit message
> >              Wall Time    266.5 ms  ±     2.8 ms     262.6 ms  …   276.7 ms            -7.8%
> >              Memory         5.9 MiB ±     0.1 MiB      5.6 MiB …     6.1 MiB           +5.1%
> >      
> >     +    Rename `dirs_paths_icase` to `dir_paths_iscase` to match the naming of
> >     +    the newly added set.
> >     +
> >          Signed-off-by: Patrick Steinhardt <ps@pks.im>
> >      
> >       ## odb/source-files.c ##
> >     @@ odb/source-files.c: static bool odb_files_dir_is_usable(struct odb_source_files
> >       	/*
> >      -	 * Prevent the common mistake of listing the same
> >      -	 * thing twice, or object directory itself.
> >     -+	 * Prevent the common mistake of listing the same thing twice, or
> >     -+	 * object directory itself.
> >     ++	 * Prevent the common mistake of listing the same thing twice,
> >     ++	 * or object directory itself.
> >     ++	 *
> >     ++	 * NEEDSWORK: we're using "core.ignoreCase" to deduplicate
> >     ++	 * alternates that _may_ be the same. This requires quite a bit
> >     ++	 * of boilerplate for dubious benefit:
> >     ++	 *
> >     ++	 *   - Duplicating alternates should really only lead to
> >     ++	 *     regressed performance.
> >     ++	 *
> >     ++	 *   - We don't properly resolve symlinks or mointpoints, so we
> >     ++	 *     may still end up duplicating alternates.
> 
> Good thought process.  "Mountpoint" is misspelled, by the way.
> 
> >     ++	 *
> >     ++	 *   - The value may be lying, in which case we might
> >     ++	 *     deduplicate alternates that are in fact not mapping to the
> >     ++	 *     same directory.
> 
> This one is much more serious than the previous two.  As an
> optimization to avoid repeating work known to produce no new
> results, deduplication can tolerate false negatives (e.g., we
> thought "DIR" and "Dir" were different and ended up scanning the
> same thing twice).  It cannot, however, allow false positives, which
> would lead to "missing" objects that only the mistakenly
> deduplicated object store could have provided.
> 
> >     ++	 * We should investigate whether we can remove this whole
> >     ++	 * mechanism outright.
> >       	 */
> 
> Sure.
> 
> I guess the previous round was already almost ready with Christian's
> review, and this round addressing his comments, we are pretty much
> done with the topic and can mark it as ready for 'next'?
Yeah, I think it should be ready to go by now. Thanks!
Patrick
Previous: Junio C Hamano
Message 38 of 38 in “odb/files: reload alternates on retry again”
  1. 0/4 odb/files: reload alternates on retry againPatrick Steinhardt, Oct 20, 2026
  2. 1/4 odb/source-files: rename alternates-related functionsPatrick Steinhardt, Oct 20, 2026
  3. 2/4 odb/source-files: reload alternates on retryPatrick Steinhardt, Oct 20, 2026
  4. Christian CouderOct 21, 2026
  5. Patrick SteinhardtOct 23, 2026
  6. 3/4 odb/source-files: avoid rechecking already-known alternatesPatrick Steinhardt, Oct 20, 2026
  7. 4/4 odb/source-files: only reload alternates when the file has changedPatrick Steinhardt, Oct 20, 2026
  8. Junio C HamanoOct 20, 2026
  9. Patrick SteinhardtOct 21, 2026
  10. 0/6 odb/files: reload alternates on retry againPatrick Steinhardt, Oct 23, 2026
  11. 1/6 odb/source-files: rename alternates-related functionsPatrick Steinhardt, Oct 23, 2026
  12. 2/6 odb/source-files: always load alternates via primary object directoryPatrick Steinhardt, Oct 23, 2026
  13. Christian CouderOct 27, 2026
  14. 3/6 odb/source-files: reload alternates on retryPatrick Steinhardt, Oct 23, 2026
  15. 4/6 odb/source-files: simplify directory duplication detectionPatrick Steinhardt, Oct 23, 2026
  16. Christian CouderOct 27, 2026
  17. Patrick SteinhardtOct 27, 2026
  18. 5/6 odb/source-files: avoid stat'ing already-known alternatesPatrick Steinhardt, Oct 23, 2026
  19. Christian CouderOct 27, 2026
  20. Patrick SteinhardtOct 27, 2026
  21. Christian CouderOct 27, 2026
  22. Patrick SteinhardtOct 28, 2026
  23. 6/6 odb/source-files: only reload alternates when the file has changedPatrick Steinhardt, Oct 23, 2026
  24. Christian CouderOct 27, 2026
  25. Patrick SteinhardtOct 27, 2026
  26. Christian CouderOct 27, 2026
  27. 0/6 odb/files: reload alternates on retry againPatrick Steinhardt, Oct 28, 2026
  28. 1/6 odb/source-files: rename alternates-related functionsPatrick Steinhardt, Oct 28, 2026
  29. 2/6 odb/source-files: always load alternates via primary object directoryPatrick Steinhardt, Oct 28, 2026
  30. 3/6 odb/source-files: reload alternates on retryPatrick Steinhardt, Oct 28, 2026
  31. 4/6 odb/source-files: simplify directory duplication detectionPatrick Steinhardt, Oct 28, 2026
  32. Christian CouderOct 28, 2026
  33. Patrick SteinhardtOct 28, 2026
  34. Junio C HamanoOct 28, 2026
  35. 5/6 odb/source-files: avoid stat'ing already-known alternatesPatrick Steinhardt, Oct 28, 2026
  36. 6/6 odb/source-files: only reload alternates when the file has changedPatrick Steinhardt, Oct 28, 2026
  37. Junio C HamanoOct 28, 2026
  38. Patrick SteinhardtOct 29, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.