git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Taylor Blau <me@ttaylorr.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, Elijah Newren <newren@gmail.com>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v2 01/19] Documentation: describe incremental MIDX format
Date: Thu, 1 Aug 2024 14:52:41 -0400	[thread overview]
Message-ID: <ZqvZeWDGDAeZNZjW@nand.local> (raw)
In-Reply-To: <20240801091952.GA1159276@coredump.intra.peff.net>

On Thu, Aug 01, 2024 at 05:19:52AM -0400, Jeff King wrote:
> > +As above, there are no fundamental limitations that stand in the way of
> > +extending the incremental MIDX format to support reachability bitmaps.
> > +The design below specifically takes this into account, and support for
> > +reachability bitmaps will be added in a future patch series. It is
> > +omitted from this series for the same reason as above.
>
> It is nice that you added a bit of a roadmap here about what is
> implemented and what is not, and that the design takes into account
> future directions (especially incremental bitmap generation).
>
> It does feel a little funny to say "this series" in text that will go
> into the repository (i.e., somebody reading the checked out file will
> say "huh? which series?"). I'm not sure how to word it better, except to
> maybe just say "in the future" and "it is omitted for now" (and
> obviously it's a pretty minor point).

s/this series/the current implementation/ ?

Definitely an oversight on my part, thanks for catching. I'll squash it
in.

> > +The `multi-pack-index-$H1.midx` file contains the first layer of the
> > +multi-pack-index chain. The `multi-pack-index-$H2.midx` file contains
> > +the second layer of the chain, and so on.
>
> Makes sense. How does the chained multi-pack-index.d interact with a
> singular multi-pack-index? Generally we should not have both at the same
> time, but I'd imagine they both exist for a brief period when moving
> from one to another.
>
> I assume the rules are the same as for commit-graphs, which use the same
> on-disk structure. I can't think of a reason to prefer one over the
> other but this might be a good place to document what does/should
> happen.

The commit-graph code reads the non-chained commit-graph first (see
commit-graph.c::read_commit_graph_one() for exact details, paraphrased
here):

    struct commit_graph *g = load_commit_graph_v1(...);
    if (!g)
            g = load_commit_graph_chain(...);
    return g;

and I matched the same for the MIDX code. I think there are reasonable
arguments for preferring either one over the other, so I think the
easiest thing to do is just throw our hands up and stick with the
convention ;-).

> > +=== Object positions for incremental MIDXs
> > +
> > +In the original multi-pack-index design, we refer to objects via their
> > +lexicographic position (by object IDs) within the repository's singular
> > +multi-pack-index. In the incremental multi-pack-index design, we refer
> > +to objects via their index into a concatenated lexicographic ordering
> > +among each component in the MIDX chain.
>
> How do duplicate objects work here? I guess there aren't any duplicates
> in the midx itself, only in the constituent packfiles. So from the
> perspective of this section, I guess it doesn't matter? And from the
> perspective of bitmaps (where the duplicate issue came up before), it is
> business as usual: the midx revindex gives the bit order, and we'd
> presumably concatenate the individual revindexes in chain order.
>
> (Mostly just thinking out loud; I'm not sure there's much for you to
> answer there).

Right. In a pre-incremental MIDX world, MIDXs contain no duplicate
object entries with respect to themselves. In this new world, the same
is true, with the additional property that MIDXs also contain no
duplicates with respect to their ancestors (when part of a MIDX chain).

> Looking good so far...
>
> -Peff

Thanks,
Taylor

  reply	other threads:[~2024-08-01 18:52 UTC|newest]

Thread overview: 102+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-06 23:04 [PATCH 00/19] midx: incremental multi-pack indexes, part one Taylor Blau
2024-06-06 23:04 ` [PATCH 01/19] Documentation: describe incremental MIDX format Taylor Blau
2024-06-06 23:04 ` [PATCH 02/19] midx: add new fields for incremental MIDX chains Taylor Blau
2024-06-06 23:04 ` [PATCH 03/19] midx: teach `nth_midxed_pack_int_id()` about incremental MIDXs Taylor Blau
2024-06-06 23:04 ` [PATCH 04/19] midx: teach `prepare_midx_pack()` " Taylor Blau
2024-06-06 23:04 ` [PATCH 05/19] midx: teach `nth_midxed_object_oid()` " Taylor Blau
2024-06-06 23:04 ` [PATCH 06/19] midx: teach `nth_bitmapped_pack()` " Taylor Blau
2024-06-06 23:04 ` [PATCH 07/19] midx: introduce `bsearch_one_midx()` Taylor Blau
2024-06-06 23:04 ` [PATCH 08/19] midx: teach `bsearch_midx()` about incremental MIDXs Taylor Blau
2024-06-06 23:04 ` [PATCH 09/19] midx: teach `nth_midxed_offset()` " Taylor Blau
2024-06-06 23:04 ` [PATCH 10/19] midx: teach `fill_midx_entry()` " Taylor Blau
2024-06-06 23:04 ` [PATCH 11/19] midx: remove unused `midx_locate_pack()` Taylor Blau
2024-06-06 23:05 ` [PATCH 12/19] midx: teach `midx_contains_pack()` about incremental MIDXs Taylor Blau
2024-06-06 23:05 ` [PATCH 13/19] midx: teach `midx_preferred_pack()` " Taylor Blau
2024-06-06 23:05 ` [PATCH 14/19] midx: teach `midx_fanout_add_midx_fanout()` " Taylor Blau
2024-06-06 23:05 ` [PATCH 15/19] midx: support reading incremental MIDX chains Taylor Blau
2024-06-06 23:05 ` [PATCH 16/19] midx: implement verification support for incremental MIDXs Taylor Blau
2024-06-06 23:05 ` [PATCH 17/19] t: retire 'GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP' Taylor Blau
2024-06-06 23:05 ` [PATCH 18/19] t/t5313-pack-bounds-checks.sh: prepare for sub-directories Taylor Blau
2024-06-06 23:05 ` [PATCH 19/19] midx: implement support for writing incremental MIDX chains Taylor Blau
2024-06-06 23:06 ` [PATCH 00/19] midx: incremental multi-pack indexes, part one Taylor Blau
2024-06-07 18:33   ` Junio C Hamano
2024-06-07 20:29     ` Taylor Blau
2024-06-07 17:55 ` Junio C Hamano
2024-06-07 20:31   ` Taylor Blau
2024-06-25 23:21 ` Junio C Hamano
2024-06-26  0:44   ` Elijah Newren
2024-07-17 21:11 ` [PATCH v2 " Taylor Blau
2024-07-17 21:11   ` [PATCH v2 01/19] Documentation: describe incremental MIDX format Taylor Blau
2024-08-01  9:19     ` Jeff King
2024-08-01 18:52       ` Taylor Blau [this message]
2024-07-17 21:12   ` [PATCH v2 02/19] midx: add new fields for incremental MIDX chains Taylor Blau
2024-08-01  9:21     ` Jeff King
2024-08-01 18:54       ` Taylor Blau
2024-07-17 21:12   ` [PATCH v2 03/19] midx: teach `nth_midxed_pack_int_id()` about incremental MIDXs Taylor Blau
2024-08-01  9:30     ` Jeff King
2024-08-01 18:57       ` Taylor Blau
2024-07-17 21:12   ` [PATCH v2 04/19] midx: teach `prepare_midx_pack()` " Taylor Blau
2024-08-01  9:35     ` Jeff King
2024-08-01 19:00       ` Taylor Blau
2024-07-17 21:12   ` [PATCH v2 05/19] midx: teach `nth_midxed_object_oid()` " Taylor Blau
2024-08-01  9:38     ` Jeff King
2024-08-01 19:03       ` Taylor Blau
2024-07-17 21:12   ` [PATCH v2 06/19] midx: teach `nth_bitmapped_pack()` " Taylor Blau
2024-08-01  9:39     ` Jeff King
2024-08-01 19:07       ` Taylor Blau
2024-07-17 21:12   ` [PATCH v2 07/19] midx: introduce `bsearch_one_midx()` Taylor Blau
2024-08-01 10:06     ` Jeff King
2024-08-01 19:54       ` Taylor Blau
2024-07-17 21:12   ` [PATCH v2 08/19] midx: teach `bsearch_midx()` about incremental MIDXs Taylor Blau
2024-08-01 10:07     ` Jeff King
2024-07-17 21:12   ` [PATCH v2 09/19] midx: teach `nth_midxed_offset()` " Taylor Blau
2024-08-01 10:08     ` Jeff King
2024-07-17 21:12   ` [PATCH v2 10/19] midx: teach `fill_midx_entry()` " Taylor Blau
2024-08-01 10:12     ` Jeff King
2024-08-01 20:01       ` Taylor Blau
2024-07-17 21:12   ` [PATCH v2 11/19] midx: remove unused `midx_locate_pack()` Taylor Blau
2024-08-01 10:14     ` Jeff King
2024-08-01 20:01       ` Taylor Blau
2024-07-17 21:12   ` [PATCH v2 12/19] midx: teach `midx_contains_pack()` about incremental MIDXs Taylor Blau
2024-08-01 10:17     ` Jeff King
2024-07-17 21:12   ` [PATCH v2 13/19] midx: teach `midx_preferred_pack()` " Taylor Blau
2024-08-01 10:25     ` Jeff King
2024-08-01 20:05       ` Taylor Blau
2024-07-17 21:12   ` [PATCH v2 14/19] midx: teach `midx_fanout_add_midx_fanout()` " Taylor Blau
2024-08-01 10:29     ` Jeff King
2024-08-01 20:09       ` Taylor Blau
2024-07-17 21:12   ` [PATCH v2 15/19] midx: support reading incremental MIDX chains Taylor Blau
2024-08-01 10:40     ` Jeff King
2024-08-01 20:35       ` Taylor Blau
2024-07-17 21:12   ` [PATCH v2 16/19] midx: implement verification support for incremental MIDXs Taylor Blau
2024-08-01 10:41     ` Jeff King
2024-07-17 21:12   ` [PATCH v2 17/19] t: retire 'GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP' Taylor Blau
2024-08-01 10:46     ` Jeff King
2024-08-01 20:36       ` Taylor Blau
2024-07-17 21:12   ` [PATCH v2 18/19] t/t5313-pack-bounds-checks.sh: prepare for sub-directories Taylor Blau
2024-07-17 21:12   ` [PATCH v2 19/19] midx: implement support for writing incremental MIDX chains Taylor Blau
2024-08-01 11:07     ` Jeff King
2024-08-01 20:39       ` Taylor Blau
2024-08-01 11:14   ` [PATCH v2 00/19] midx: incremental multi-pack indexes, part one Jeff King
2024-08-01 20:41     ` Taylor Blau
2024-08-06 15:36 ` [PATCH v3 " Taylor Blau
2024-08-06 15:36   ` [PATCH v3 01/19] Documentation: describe incremental MIDX format Taylor Blau
2024-08-06 15:36   ` [PATCH v3 02/19] midx: add new fields for incremental MIDX chains Taylor Blau
2024-08-06 15:37   ` [PATCH v3 03/19] midx: teach `nth_midxed_pack_int_id()` about incremental MIDXs Taylor Blau
2024-08-06 15:37   ` [PATCH v3 04/19] midx: teach `prepare_midx_pack()` " Taylor Blau
2024-08-06 15:37   ` [PATCH v3 05/19] midx: teach `nth_midxed_object_oid()` " Taylor Blau
2024-08-06 15:37   ` [PATCH v3 06/19] midx: teach `nth_bitmapped_pack()` " Taylor Blau
2024-08-06 15:37   ` [PATCH v3 07/19] midx: introduce `bsearch_one_midx()` Taylor Blau
2024-08-06 15:37   ` [PATCH v3 08/19] midx: teach `bsearch_midx()` about incremental MIDXs Taylor Blau
2024-08-06 15:37   ` [PATCH v3 09/19] midx: teach `nth_midxed_offset()` " Taylor Blau
2024-08-06 15:37   ` [PATCH v3 10/19] midx: teach `fill_midx_entry()` " Taylor Blau
2024-08-06 15:37   ` [PATCH v3 11/19] midx: remove unused `midx_locate_pack()` Taylor Blau
2024-08-06 15:37   ` [PATCH v3 12/19] midx: teach `midx_contains_pack()` about incremental MIDXs Taylor Blau
2024-08-06 15:37   ` [PATCH v3 13/19] midx: teach `midx_preferred_pack()` " Taylor Blau
2024-08-06 15:37   ` [PATCH v3 14/19] midx: teach `midx_fanout_add_midx_fanout()` " Taylor Blau
2024-08-06 15:37   ` [PATCH v3 15/19] midx: support reading incremental MIDX chains Taylor Blau
2024-08-06 15:37   ` [PATCH v3 16/19] midx: implement verification support for incremental MIDXs Taylor Blau
2024-08-06 15:38   ` [PATCH v3 17/19] t: retire 'GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP' Taylor Blau
2024-08-06 15:38   ` [PATCH v3 18/19] t/t5313-pack-bounds-checks.sh: prepare for sub-directories Taylor Blau
2024-08-06 15:38   ` [PATCH v3 19/19] midx: implement support for writing incremental MIDX chains Taylor Blau
2024-08-12 14:27   ` [PATCH v3 00/19] midx: incremental multi-pack indexes, part one Jeff King

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=ZqvZeWDGDAeZNZjW@nand.local \
    --to=me@ttaylorr.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=newren@gmail.com \
    --cc=peff@peff.net \
    /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;
as well as URLs for NNTP newsgroup(s).