[go: up one dir, main page]

Skip to content

odb: track multi-pack-indices via their alternates

Hi,

multi-pack-indices are tracked via struct multi_pack_index. This data structure is stored inside struct object_database, which is the global database that spans across all of the alternate object directories.

This layout causes two problems:

  • Multi-pack indices aren't global to an object database, but instead there can be one multi-pack index per alternate. This creates a mismatch between the on-disk layout and how things are organized in the object database subsystems and makes some parts, like figuring out whether an alternate has an MIDX, quite awkward.

  • Multi-pack indices are an implementation detail of how efficient access for packfiles work. As such, they are neither relevant in the context of loose objects, nor in a potential future where we have pluggable backends.

This patch series thus refactors the codebase to stop tracking MIDX's globally. Instead, they are being pushed down one level so that every struct odb_alternate has an optional MIDX itself. This simplifies some of our code and will make it easier in a future iteration to move the data into a packfile-specific alternate backend.

Thanks!

Patrick

To: git@vger.kernel.org

--- b4-submit-tracking ---

This section is used internally by b4 prep for tracking purposes.

{ "series": { "revision": 1, "change-id": "20250513-b4-pks-midx-via-odb-alternate-d4b5940a28cd", "prefixes": [] } }

Closes Move multi-pack-index-related state out of `str... (#548 - closed).

Edited by Patrick Steinhardt

Merge request reports

Loading