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

Re: [PATCH v4 9/9] Documentation/config: add odb.<name>.promisorRemote

From
JTJonathan Tan <jonathantanmy@google.com>
Date
Oct 16, 2018, 22:22 UTC
Message-ID
<20181016222243.58620-1-jonathantanmy@google.com>
In-Reply-To
<20181016174304.GA221682@aiede.svl.corp.google.com>
Show 5 quoted lines
>  1. Teaching partial clone to attempt to fetch missing objects from
>     multiple remotes instead of only one.  This is useful because you
>     can have a server that is nearby and cheaper to serve from (some
>     kind of local cache server) that you make requests to first before
>     falling back to the canonical source of objects.

Quoting the above definition of (1) for reference. I think Jonathan Nieder has covered the relevant points well - I'll just expand on (1).

Show 22 quoted lines
> So much for the current setup.  For (1), I believe you are proposing to
> still have only one effective <promisor-id>, so it doesn't necessarily
> require modifying the extensions.* configuration.  Instead, the idea is
> that when trying to access an object, we would follow one of a list of
> steps:
> 
>  1. First, check the local object store. If it's there, we're done.
>  2. Second, try alternates --- maybe the object is in one of those!
>  3. Now, try promisor remotes, one at a time, in user-configured order.
> 
> In other words, I think that for (1) all we would need is a new
> configuration
> 
> 	[object]
> 		missingObjectRemote = local-cache-remote
> 		missingObjectRemote = origin
> 
> The semantics would be that when trying to access a promised object,
> we attempt to fetch from these remotes one at a time, in the order
> specified.  We could require that the remote named in
> extensions.partialClone be one of the listed remotes, without having
> to care where it shows up in the list.

Or allow extensions.partialClone=<R> wherein <R> is not in the missingObjectRemote, in which case <R> is tried first, so that we don't have to reject some configurations.

> That way, we get the benefit (1) without having to change the
> semantics of extensions.partialClone and without having to care about
> the order of sections in the config.  What do you think?

Let's define the promisor remotes of a repository as those in missingObjectRemote or extensions.partialClone (currently, we talk about "the promisor remote" (singular), defined in extensions.partialClone).

Overall, this seems like a reasonable idea to me, if we keep the restriction that we can only fetch with filter from a promisor remote. This allows us to extend the definition of a promisor object in a manner consistent to the current definition - to say "a promisor object is one promised by at least one promisor remote" (currently, "a promisor object is promised by the promisor remote").

In the presence of missingObjectRemote, old versions of Git, when lazily fetching, would only know to try the extensions.partialClone remote. But this is safe because existing data wouldn't be clobbered (since we're not using ideas like adding meaning to the contents of the .promisor file). Also, other things like fsck and gc still work.

Previous: Jonathan NiederNext: Junio C Hamano
Message 18 of 23 in “Introducing remote ODBs”
  1. 0/9 Introducing remote ODBsChristian Couder, Aug 2, 2018
  2. 1/9 fetch-object: make functions return an error codeChristian Couder, Aug 2, 2018
  3. 2/9 Add initial remote odb supportChristian Couder, Aug 2, 2018
  4. 3/9 remote-odb: implement remote_odb_get_direct()Christian Couder, Aug 2, 2018
  5. 4/9 remote-odb: implement remote_odb_get_many_direct()Christian Couder, Aug 2, 2018
  6. 5/9 remote-odb: add remote_odb_reinit()Christian Couder, Aug 2, 2018
  7. 6/9 Use remote_odb_get_direct() and has_remote_odb()Christian Couder, Aug 2, 2018
  8. 7/9 Use odb.origin.partialclonefilter instead of core.partialclonefilterChristian Couder, Aug 2, 2018
  9. 8/9 t0410: test fetching from many promisor remotesChristian Couder, Aug 2, 2018
  10. 9/9 Documentation/config: add odb.<name>.promisorRemoteChristian Couder, Aug 2, 2018
  11. Stefan BellerAug 2, 2018
  12. Christian CouderSep 25, 2018
  13. Junio C HamanoSep 25, 2018
  14. Jeff KingSep 26, 2018
  15. Taylor BlauSep 26, 2018
  16. Junio C HamanoSep 26, 2018
  17. Jonathan NiederOct 16, 2018
  18. Jonathan TanOct 16, 2018
  19. Junio C HamanoOct 19, 2018
  20. Jonathan NiederOct 19, 2018
  21. Junio C HamanoOct 19, 2018
  22. Christian CouderOct 31, 2018
  23. Jeff KingNov 1, 2018

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.