Git development
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Karthik Nayak <karthik.188@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 00/13] odb/source-files: move alternates into the backend
Date: Wed, 7 Oct 2026 07:50:21 +0200	[thread overview]
Message-ID: <asXdne7-Vujgkud1@pks.im> (raw)
In-Reply-To: <CAOLa=ZTHSRmwJgsxi9Fq5ek5wVsFYUHD_ohwSmzWLQjcM3TYLA@mail.gmail.com>

On Tue, Oct 06, 2026 at 01:53:24PM -0700, Karthik Nayak wrote:
> Patrick Steinhardt <ps@pks.im> writes:
> 
> > Hi,
> >
> > Originally, when designing pluggable object databases the goal was that
> > the object database can have multiple sources, and every source attached
> > to it could use a different backend. This would have allowed for quite a
> > lot of flexibility, as you could trivially mix and match different kinds
> > of object storages in whatever way you like.
> >
> > But while well-intentioned, this design led to a bunch of conceptual
> > problems:
> >
> >   - We're now trying to read objects in source order, whereas we
> >     previously tried to read objects via packfiles before trying to read
> >     them via loose objects. This led to a performance regression when
> >     using alternates or when using a quarantine directory.
> >
> >   - Some data structures are supposed to only ever exist once, like for
> >     example bitmaps and commit graphs. At the same time, those data
> >     structures also span across the union of all objects, so they may
> >     cross sources.
> >
> >   - It is unclear how we can extend GIT_OBJECT_DIRECTORY or
> >     GIT_ALTERNATE_OBJECT_DIRECTORIES to become backend-agnostic in a
> >     backwards-compatible way. In general, introducing an object storage
> >     extension into the current status quo where alternates may have to
> >     be extended to become generic was proving to be painful.
> >
> >   - Some mechanisms of alternates assume way too much about how exactly
> >     their backends work. Alternate refs for example assume that the
> >     alternate is backed by a filesystem path, and that this filesystem
> >     path may also allow us to read references. This is not a given
> >     though, as backends may not even have local data at all.
> >
> > In short, there are a bunch of conceptual mismatches when we have
> > alternates and pluggable object databases coexist. So while the original
> > idea was nice, it does not result in a system that is easy to reason
> > about.
> >
> > This patch series corrects course by moving alternates into the "files"
> > backend itself so that they become another implementation detail. It's
> > unfortunately on the bigger side, and I'm sorry about that, but I
> > couldn't really find a way to split it up further in a sensible way.
> 
> I went through the series, took attention split over two days. The
> changes look good to me, but would definitely like to see another review :)

Thanks for your review!

Patrick

  reply	other threads:[~2026-10-07  5:50 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-02 10:08 [PATCH 00/13] odb/source-files: move alternates into the backend Patrick Steinhardt
2026-10-02 10:08 ` [PATCH 01/13] commit-graph: require resolved packfile paths for `stdin_packs` Patrick Steinhardt
2026-10-05 19:27   ` Karthik Nayak
2026-10-06 12:18     ` Patrick Steinhardt
2026-10-02 10:08 ` [PATCH 02/13] commit-graph: stop depending on `struct odb_source` Patrick Steinhardt
2026-10-05 19:43   ` Karthik Nayak
2026-10-06 12:18     ` Patrick Steinhardt
2026-10-06 20:11       ` Karthik Nayak
2026-10-02 10:08 ` [PATCH 03/13] odb/source-files: introduce `struct odb_files_dir` Patrick Steinhardt
2026-10-02 10:08 ` [PATCH 04/13] odb: refactor `odb_for_each_alternate()` to yield dirs Patrick Steinhardt
2026-10-06  8:42   ` Karthik Nayak
2026-10-02 10:08 ` [PATCH 05/13] odb: refactor `odb_find_source()` " Patrick Steinhardt
2026-10-02 10:08 ` [PATCH 06/13] odb/source-files: add the ability to have multiple object dirs Patrick Steinhardt
2026-10-02 10:08 ` [PATCH 07/13] tmp-objdir: absorb logic to set and restore primary sources Patrick Steinhardt
2026-10-02 10:08 ` [PATCH 08/13] tmp-objdir: manage quarantine as an object directory Patrick Steinhardt
2026-10-06 20:18   ` Karthik Nayak
2026-10-06 20:27     ` Karthik Nayak
2026-10-02 10:08 ` [PATCH 09/13] tmp-objdir: replace primary source at creation time Patrick Steinhardt
2026-10-02 10:08 ` [PATCH 10/13] odb/source: make `will_destroy` an implementation detail Patrick Steinhardt
2026-10-02 10:08 ` [PATCH 11/13] odb/source-files: extract reading alternates Patrick Steinhardt
2026-10-02 10:08 ` [PATCH 12/13] odb/source-files: move alternates into the backend Patrick Steinhardt
2026-10-06 20:51   ` Karthik Nayak
2026-10-07  5:50     ` Patrick Steinhardt
2026-10-02 10:08 ` [PATCH 13/13] odb/source: drop `read_alternates` callback Patrick Steinhardt
2026-10-06 20:53 ` [PATCH 00/13] odb/source-files: move alternates into the backend Karthik Nayak
2026-10-07  5:50   ` Patrick Steinhardt [this message]
2026-10-08  8:35 ` [PATCH v2 " Patrick Steinhardt
2026-10-08  8:35   ` [PATCH v2 01/13] commit-graph: require resolved packfile paths for `stdin_packs` Patrick Steinhardt
2026-10-08  8:35   ` [PATCH v2 02/13] commit-graph: stop depending on `struct odb_source` Patrick Steinhardt
2026-10-08  8:35   ` [PATCH v2 03/13] odb/source-files: introduce `struct odb_files_dir` Patrick Steinhardt
2026-10-08  8:35   ` [PATCH v2 04/13] odb: refactor `odb_for_each_alternate()` to yield dirs Patrick Steinhardt
2026-10-08  8:35   ` [PATCH v2 05/13] odb: refactor `odb_find_source()` " Patrick Steinhardt
2026-10-08  8:35   ` [PATCH v2 06/13] odb/source-files: add the ability to have multiple object dirs Patrick Steinhardt
2026-10-08  8:35   ` [PATCH v2 07/13] tmp-objdir: absorb logic to set and restore primary sources Patrick Steinhardt
2026-10-08  8:35   ` [PATCH v2 08/13] tmp-objdir: manage quarantine as an object directory Patrick Steinhardt
2026-10-08  8:35   ` [PATCH v2 09/13] tmp-objdir: replace primary source at creation time Patrick Steinhardt
2026-10-08  8:36   ` [PATCH v2 10/13] odb/source: make `will_destroy` an implementation detail Patrick Steinhardt
2026-10-08  8:36   ` [PATCH v2 11/13] odb/source-files: extract reading alternates Patrick Steinhardt
2026-10-08  8:36   ` [PATCH v2 12/13] odb/source-files: move alternates into the backend Patrick Steinhardt
2026-10-08  8:36   ` [PATCH v2 13/13] odb/source: drop `read_alternates` callback Patrick Steinhardt
2026-10-08  9:24   ` [PATCH v2 00/13] odb/source-files: move alternates into the backend Karthik Nayak

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=asXdne7-Vujgkud1@pks.im \
    --to=ps@pks.im \
    --cc=git@vger.kernel.org \
    --cc=karthik.188@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox