git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Taylor Blau <me@ttaylorr.com>
To: git@vger.kernel.org
Cc: Jeff King <peff@peff.net>, Elijah Newren <newren@gmail.com>,
	Junio C Hamano <gitster@pobox.com>
Subject: [PATCH 00/19] midx: incremental multi-pack indexes, part one
Date: Thu, 6 Jun 2024 19:04:22 -0400	[thread overview]
Message-ID: <cover.1717715060.git.me@ttaylorr.com> (raw)

This series implements incremental MIDXs, which allow for storing
a MIDX across multiple layers, each with their own distinct set of
packs.

MOTIVATION
==========

Doing so allows large repositories to make use of the MIDX feature
without having to rewrite the entire MIDX every time they want to update
the set of packs contained in the MIDX. For extremely large
repositories, doing so is often infeasible.

OVERVIEW
========

This series implements the first component of incremental MIDXs, meaning
by the end of it you can run:

    $ git multi-pack-index write --incremental

a couple of times, and produce a directory structure like:

    $ .git/objects/pack/multi-pack-index.d
    .git/objects/pack/multi-pack-index.d
    ├── multi-pack-index-chain
    ├── multi-pack-index-baa53bc5092bed50378fe9232ae7878828df2890.midx
    └── multi-pack-index-f60023a8a104be94eab96dd7c42a6a5db67c82ba.midx

where each *.midx file behaves the same way as existing non-incremental
MIDX implementation behaves today, but in a way that stitches together
multiple MIDX "layers" without having to rewrite the whole MIDX anytime
you want to make a modification to it.

This is "part one" of a multi-part series. The overview of how all of
these series fit together is as follows:

  - "Part zero": preparatory work like 'tb/midx-write-cleanup' and my
    series to clean up temporary file handling [1, 2].

  - "Part one": this series, which enables reading and writing
    incremental MIDXs, but does not have support for more advanced
    features like bitmaps support or rewriting parts of the MIDX chain.

  - "Part two": the next series, which builds on support for multi-pack
    reachability bitmaps in an incremental MIDX world, meaning that each
    `*.midx` layer can have its own `*.bitmap`, and the bitmaps at each
    layer can be used together.

  - "Part three": which supports more advanced management of the MIDX
    chain, like compressing intermediate layers to avoid the chain
    growing too long.

Parts zero, one, and two all exist, and the first two have been shared
with the list. Part two exists in ttaylorr/git [3], but is excluded from
this series to keep the length manageable. I avoided sending this series
until I was confident that bitmaps worked on top of incremental MIDXs to
avoid designing ourselves into a corner.

Part three doesn't exist yet, but is straightforward to do on top. None
of the design decisions made in this series inhibit my goals for part
three.

[1]: https://lore.kernel.org/git/cover.1717023301.git.me@ttaylorr.com/
[2]: https://lore.kernel.org/git/cover.1717712358.git.me@ttaylorr.com/
[3]: https://github.com/ttaylorr/git/compare/tb/incremental-midx...ttaylorr:git:tb/incremental-midx-bitmaps

Taylor Blau (19):
  Documentation: describe incremental MIDX format
  midx: add new fields for incremental MIDX chains
  midx: teach `nth_midxed_pack_int_id()` about incremental MIDXs
  midx: teach `prepare_midx_pack()` about incremental MIDXs
  midx: teach `nth_midxed_object_oid()` about incremental MIDXs
  midx: teach `nth_bitmapped_pack()` about incremental MIDXs
  midx: introduce `bsearch_one_midx()`
  midx: teach `bsearch_midx()` about incremental MIDXs
  midx: teach `nth_midxed_offset()` about incremental MIDXs
  midx: teach `fill_midx_entry()` about incremental MIDXs
  midx: remove unused `midx_locate_pack()`
  midx: teach `midx_contains_pack()` about incremental MIDXs
  midx: teach `midx_preferred_pack()` about incremental MIDXs
  midx: teach `midx_fanout_add_midx_fanout()` about incremental MIDXs
  midx: support reading incremental MIDX chains
  midx: implement verification support for incremental MIDXs
  t: retire 'GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP'
  t/t5313-pack-bounds-checks.sh: prepare for sub-directories
  midx: implement support for writing incremental MIDX chains

 Documentation/git-multi-pack-index.txt       |  11 +-
 Documentation/technical/multi-pack-index.txt | 100 +++++
 builtin/multi-pack-index.c                   |   2 +
 builtin/repack.c                             |   8 +-
 ci/run-build-and-tests.sh                    |   2 +-
 midx-write.c                                 | 293 +++++++++++--
 midx.c                                       | 410 ++++++++++++++++---
 midx.h                                       |  26 +-
 object-name.c                                |  99 ++---
 packfile.c                                   |  21 +-
 packfile.h                                   |   4 +
 t/README                                     |   6 +-
 t/helper/test-read-midx.c                    |  24 +-
 t/lib-bitmap.sh                              |   6 +-
 t/lib-midx.sh                                |  28 ++
 t/t0410-partial-clone.sh                     |   2 -
 t/t5310-pack-bitmaps.sh                      |   4 -
 t/t5313-pack-bounds-checks.sh                |   8 +-
 t/t5319-multi-pack-index.sh                  |  30 +-
 t/t5326-multi-pack-bitmaps.sh                |   4 +-
 t/t5327-multi-pack-bitmaps-rev.sh            |   6 +-
 t/t5332-multi-pack-reuse.sh                  |   2 +
 t/t5334-incremental-multi-pack-index.sh      |  46 +++
 t/t7700-repack.sh                            |  48 +--
 24 files changed, 935 insertions(+), 255 deletions(-)
 create mode 100755 t/t5334-incremental-multi-pack-index.sh


base-commit: 680474691b4639280a73baa0bb8792634f99f611
-- 
2.45.2.437.gecb9450a0e

             reply	other threads:[~2024-06-06 23:04 UTC|newest]

Thread overview: 102+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-06 23:04 Taylor Blau [this message]
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
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=cover.1717715060.git.me@ttaylorr.com \
    --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).