[PATCH v2 0/6] odb/files: cleanups and improvements for alternates
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Oct 14, 2026, 08:53 UTC
- Message-ID
- <20261014-pks-odb-files-alternates-cleanups-v2-0-fed9b2caa3be@pks.im>
- In-Reply-To
- <20261013-pks-odb-files-alternates-cleanups-v1-0-b7030ff2b26f@pks.im>
Hi,
this patch series contains a couple of follow-up cleanups and improvements that are now possible after having migrated alternates into the "files" backend.
The series is built on top of 6de20f6092 (The 4th batch, 2026-10-06) with ps/odb-files-alternates at 0ba59c8453 (odb/source: drop `read_alternates` callback, 2026-10-08) merged into it.
Changes in v2:
- Add another refactoring on top to only fetch objects from a promisor
remote in case they are missing.
- Link to v1: https://patch.msgid.link/20261013-pks-odb-files-alternates-cleanups-v1-0-b7030ff2b26f@pks.imThanks!
Patrick
---
Patrick Steinhardt (6):
odb/source-files: fix performance when reading objects with alternates
odb/source-files: fix performance when streaming objects with alternates
odb/source-files: make the second read an implementation detail
odb: remove read loop for found objects
odb: don't try re-fetching corrupt objects
odb/source: drop `local` flagmidx.c | 2 +- odb.c | 63 +++++++++++++++------------------------------------ odb.h | 12 ---------- odb/source-files.c | 26 +++++++++++++++++---- odb/source-inmemory.c | 10 +++++--- odb/source-loose.c | 17 ++------------ odb/source-loose.h | 3 +-- odb/source-packed.c | 20 +++++----------- odb/source-packed.h | 7 ++++++ odb/source.c | 4 +--- odb/source.h | 20 +--------------- repack.c | 2 +- 12 files changed, 66 insertions(+), 120 deletions(-)
Range-diff versus v1:
1: c576112f90 = 1: bd071672be odb/source-files: fix performance when reading objects with alternates 2: f4065cfc43 = 2: 3092e588e9 odb/source-files: fix performance when streaming objects with alternates 3: 7d10934490 = 3: 2a347fcc0c odb/source-files: make the second read an implementation detail 4: e4b41bd118 = 4: b5080890d7 odb: remove read loop for found objects -: ---------- > 5: fd362349fa odb: don't try re-fetching corrupt objects 5: bafbc979e9 = 6: 8384fcc65b odb/source: drop `local` flag
--- base-commit: ea99757de7d4ef6c7727431bfd7b6726614102e0 change-id: 20261006-pks-odb-files-alternates-cleanups-11f686cc4942