git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC/PATCH 0/8] Add initial experimental external ODB support

From
Duy Nguyen <pclouds@gmail.com>
Date
Jun 13, 2016, 10:10 UTC
Message-ID
<CACsJy8ARuqKX1z4zze6Xj47X14tJ1eApCWivDwwuQh2gqRBYMw@mail.gmail.com>
In-Reply-To
<20160613085546.11784-1-chriscool@tuxfamily.org>

On Mon, Jun 13, 2016 at 3:55 PM, Christian Couder <christian.couder@gmail.com> wrote:

Show 12 quoted lines
> Future work
> ~~~~~~~~~~~
>
> From the discussions it appear that using the bundle v3 mechanism to
> tranfer external ODB data could work, but only if the server has access
> to its own external ODB.
>
> Another possible mechanism to transfer external ODB data would be some
> kind of replace refs. This would be slower but the mechanism for the
> transfer already fully exists.
>
> So I think I am going to experiment with some kind of replace refs.
Or we can go "fault-in" all the way.
1) Extend rev-list to support large blob exclusion, e.g. blobs whose
size above a certain limit are excluded, or blobs in certain paths are
excluded (maybe except those at the tip)
2) Add a new command, similar to "shallow", in the git protocol for
the client to tell the server that it does not want the server to send
certain large blobs (and the server probably should acknowledge with
"ok you can get them from this url...")
3) upload-pack passes the relevant rev-list blob filtering arguments
to pack-objects, no big blobs are transferred
4) External odb setting must be done (temporarily) before index-pack
is run (as part of the clone/fetch process). index-pack will notice
that certain blobs are missing from the received pack, but it will
also notice that it already has them via standard has_sha1_file() (we
just need to make sure it does not read blob content back, i think
we're ok here). I'm assuming here that EODB in fact contains _all_
blobs, so no extra setup is required at the server side.
5) If index-pack says "ok" then you can make this new external odb
permanent, else remove it.

Subsequent fetches need to send the same "do not include these blobs" instructions, of course. Not sure how well it interacts with pack-bitmap, but I guess when you use this, you probably already use shallow clone (which disables pack bitmap).

> One interesting thing also would be to use the streaming api when
> reading from or writing to the external ODB.

If EODB is about large blobs only, you probably want to stream them directly to a pack as you get them and not keep in loose object form. Infrastructure is already in place (I think it's used by git-add), but hooking it at sha1_file.c layer might be tricky. This is just cherry on top, not strictly needed of course.

-- 
Duy
Previous: Christian Couder
Message 10 of 10 in “Add initial experimental external ODB support”
  1. 0/8 Add initial experimental external ODB supportChristian Couder, Jun 13, 2016
  2. 2/8 external odb foreachChristian Couder, Jun 13, 2016
  3. 4/8 t0400: add 'put' command to odb-helper scriptChristian Couder, Jun 13, 2016
  4. 1/8 Add initial external odb supportChristian Couder, Jun 13, 2016
  5. 6/8 external odb: add write supportChristian Couder, Jun 13, 2016
  6. 7/8 external-odb: accept only blobs for nowChristian Couder, Jun 13, 2016
  7. 3/8 t0400: use --batch-all-objects to get all objectsChristian Couder, Jun 13, 2016
  8. 8/8 t0400: add test for external odb write supportChristian Couder, Jun 13, 2016
  9. 5/8 t0400: add test for 'put' commandChristian Couder, Jun 13, 2016
  10. Duy NguyenJun 13, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.