All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] odb/files: reload alternates on retry again
@ 2026-10-20  8:54 Patrick Steinhardt
  2026-10-20  8:54 ` [PATCH 1/4] odb/source-files: rename alternates-related functions Patrick Steinhardt
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Patrick Steinhardt @ 2026-10-20  8:54 UTC (permalink / raw)
  To: git

Hi,

we recently noticed that we don't reload alternates anymore when an
object cannot be found. This used to be the case, but broke with
5946a564cd (odb/source: make `read_object_info()` function pluggable,
2026-03-05). And while it's a rather uncommon scenario that alternates
are getting rewritten while a Git process runs we managed to hit some
such scenarios in production systems.

In any case, this patch series fixes that. In practice, only the second
commit is really needed to restore functionality. I was a bit unhappy
about the performance impact of this change though, as fixing the logic
regressed us from 180ms when looking up 20k missing objects to 309ms. So
the last two patches do some optimizations that bring us down to 197ms.

The series is built on top of 47fdf2208c (The 7th batch, 2026-10-19)
with ps/odb-files-alternates-cleanups at f211a3f0b5 (odb/source: drop
`local` flag, 2026-10-15) merged into it.

Thanks!

Patrick

---
Patrick Steinhardt (4):
      odb/source-files: rename alternates-related functions
      odb/source-files: reload alternates on retry
      odb/source-files: avoid rechecking already-known alternates
      odb/source-files: only reload alternates when the file has changed

 odb/source-files.c  | 84 +++++++++++++++++++++++++++++++----------------------
 odb/source-files.h  |  4 +++
 t/t1006-cat-file.sh | 32 ++++++++++++++++++++
 3 files changed, 86 insertions(+), 34 deletions(-)


---
base-commit: c8e565497cff47f6b23a6b96bef6fa82afa11667
change-id: 20261014-pks-odb-files-reload-alternates-dfc6dc010122


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-10-21 10:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-20  8:54 [PATCH 0/4] odb/files: reload alternates on retry again Patrick Steinhardt
2026-10-20  8:54 ` [PATCH 1/4] odb/source-files: rename alternates-related functions Patrick Steinhardt
2026-10-20  8:54 ` [PATCH 2/4] odb/source-files: reload alternates on retry Patrick Steinhardt
2026-10-20  8:54 ` [PATCH 3/4] odb/source-files: avoid rechecking already-known alternates Patrick Steinhardt
2026-10-20  8:54 ` [PATCH 4/4] odb/source-files: only reload alternates when the file has changed Patrick Steinhardt
2026-10-20 19:59   ` Junio C Hamano
2026-10-21 10:17     ` Patrick Steinhardt

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.